Authentication Logic
Implement Better Auth Session Checks
Authentication flows can become inconsistent between client components and server routes. This skill provides focused Better Auth patterns for sign-in, sign-out, and session protection.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "Authentication Logic" from https://skillstore.io/skills/abdulsamad94-authentication-logic.md and its manifest at https://skillstore.io/api/skills/abdulsamad94-authentication-logic/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "Authentication Logic". How do I check whether a user is signed in on the server?
Expected outcome:
A concise session-check flow using the server auth API and request headers, followed by a 401 response when no session exists.
Using "Authentication Logic". How do I add Google sign-in to a client component?
Expected outcome:
A client-side social sign-in call that selects Google and sends the user to the onboarding path after authentication.
Using "Authentication Logic". What should my AuthBar display?
Expected outcome:
Guidance to show the authenticated user avatar when a session exists and a login button otherwise.
Security Audit
SafeAll ten static findings are false positives caused by Markdown inline-code markers and fenced TypeScript examples. The skill contains no shell commands, dynamic command execution, prompt injection, or other net-new malicious intent.
Risk Factors
⚙️ External commands (10)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/abdulsamad94-authentication-logic/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/abdulsamad94-authentication-logic?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/abdulsamad94-authentication-logic?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/abdulsamad94-authentication-logic/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/abdulsamad94-authentication-logic.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA · BibTeX · CFF)
APA citation
AbdulSamad94. (2026). Authentication Logic security audit report (audit version 10) [Author version unspecified]. Skillstore. https://skillstore.io/skills/abdulsamad94-authentication-logic/audits/10BibTeX citation
@techreport{abdulsamad94-abdulsamad94-authentication-logic-2026,
author = {AbdulSamad94},
title = {Authentication Logic security audit report (audit version 10)},
institution = {Skillstore},
year = {2026},
number = {10},
url = {https://skillstore.io/skills/abdulsamad94-authentication-logic/audits/10},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "Authentication Logic security audit report (audit version 10)"
version: "unspecified"
type: report
authors:
- name: "AbdulSamad94"
date-released: "2026-07-18"
url: "https://skillstore.io/skills/abdulsamad94-authentication-logic/audits/10"
identifiers:
- type: other
value: "skillstore:abdulsamad94-authentication-logic:audit:10"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Add client sign-in actions
Use the email, social sign-in, and sign-out examples in a Next.js client component.
Protect server endpoints
Check the session before returning protected data from an API route or Server Action.
Review authentication integration
Confirm that client, server, and authentication status components use the documented Better Auth responsibilities.
Try These Prompts
Use this skill to show how to add an email sign-in action with authClient in my Next.js client component.
Use this skill to show how to read the current Better Auth session in a Next.js route handler.
Use this skill to add a session check and a clear unauthorized response before my Server Action performs protected work.
Use this skill to review my client and server authentication flow. Identify where sign-in, session checks, and AuthBar status belong.
Best Practices
- Perform session checks on the server before protected work begins.
- Keep client sign-in actions separate from server authorization checks.
- Return a clear unauthorized response when no valid session exists.
Avoid
- Do not rely only on client-side session state to protect server data.
- Do not perform protected actions before checking the server session.
- Do not expose authentication secrets in client-side components.
Frequently Asked Questions
Which authentication library does this skill use?
Can I use this skill for client-side sign-in?
Can I protect API routes with this skill?
Does it configure a database or OAuth provider?
Does it implement roles and permissions?
Where is the authentication status component described?
Developer Details
Author
AbdulSamad94License
MIT
Skillstore revision
r2
Version notice
The author did not declare a version.
Ref
80999bf530a7874d7bedf8ce202001ecb4c4f5e0
Maintenance freshness
7/19/2026
Usage
5 downloads · 237 views
File structure
📄 SKILL.md