param087/saas-starter-skills/authentication
Claude Code and agent skill by param087/saas-starter-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when adding sign-in/sign-up or session handling to a SaaS app — set up Auth.js (NextAuth) or a hosted provider with secure sessions, OAuth + email, and server-side session checks that protect routes and actions.
Install
npx vskill@latest install param087/saas-starter-skills/authenticationSKILL.md
The same SKILL.md was published earlier as param087/saas-starter-skills/authentication.
Authentication
Overview
Authentication is the gate to everything else, so don't hand-roll it. Use Auth.js (NextAuth) with the Drizzle adapter, or a hosted provider (Clerk/Supabase/WorkOS) if you want MFA and user management out of the box. The non-negotiables: httpOnly session cookies, server-side session resolution, and a single requireSession() helper used by every protected route and action.
When to use
- Adding login, signup, OAuth, or magic-link auth.
- Protecting routes, server actions, or route handlers.
- Resolving "who is the current user/org" on the server.
The pattern (Auth.js)
Use it in a layout to protect a whole route group:
Security essentials
- Sessions in httpOnly, Secure, SameSite=Lax cookies. Never store tokens in
localStorage. - Resolve sessions on the server (
auth()in components/actions), not from a client fetch you trust. - Rotate + expire. Set sensible session max-age; support sign-out everywhere.
- Hash passwords with argon2/bcrypt only if you truly own credentials — prefer OAuth/magic-link.
Pitfalls
- Trusting client-side auth state for authorization — it's a UX hint only; always re-check on the server.
- JWT sessions when you need instant revocation — use the database strategy if "log out all devices" matters.
- Leaking whether an email exists — keep sign-in errors generic (pair with
auth-screensUX). - No CSRF protection on credential posts — Auth.js handles this; don't bypass it with custom forms.
- Protecting only the UI — a route handler without a session check is wide open.
Hand-off
A trustworthy requireSession(). multi-tenancy turns the user into an active org; authorization-rbac checks what that user may do.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/authentication/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/param087/saas-starter-skills/authentication)