Help us improve
Share bugs, ideas, or general feedback.
From role-fullstack
Implements fullstack auth flows: login/signup/forgot-password pages, JWT+refresh tokens, session auth, social login (Google/GitHub/Apple), MFA/2FA, protected routes via middleware, role-based UI. Use for adding auth/authorization.
npx claudepluginhub rnavarych/alpha-engineer --plugin role-fullstackHow this skill is triggered — by the user, by Claude, or both
Slash command
/role-fullstack:auth-flowThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Activate when adding authentication or authorization to a fullstack application -- login/signup pages, protected routes, social login, token management, or role-based access control.
Implements complete Next.js authentication with Auth.js: OAuth providers (GitHub/Google), credentials login, Prisma adapter, session management (JWT/DB), middleware-protected routes, RBAC, and login forms.
Scaffold signin and signup authentication endpoints for a project. Use when the user wants to add authentication, create login/register flows, or set up auth from scratch.
Implements authentication and authorization patterns: JWT, OAuth2, session management, RBAC. Helps secure APIs and debug auth issues.
Share bugs, ideas, or general feedback.
Activate when adding authentication or authorization to a fullstack application -- login/signup pages, protected routes, social login, token management, or role-based access control.
| Library | Framework | Session Store | OAuth Built-in | MFA Support |
|---|---|---|---|---|
| NextAuth.js / Auth.js | Next.js, SvelteKit | DB / JWT | Yes | Via adapter |
| Lucia | Any | DB | Manual | Manual |
| Clerk | Any | Managed | Yes | Yes |
| Supabase Auth | Any | Managed | Yes | Yes |
react-hook-form + zod for validation. Fields: email, password, confirm password (signup).bcrypt (cost 12+) or argon2, store user in DB.httpOnly, secure, sameSite=lax cookie) or JWT pair.callbackUrl).httpOnly cookie. Rotate on every use (one-time use tokens)./api/auth/refresh, replays the original request.{APP_URL}/api/auth/callback/{provider}.otpauth or speakeasy library. Generate a secret, show QR code, verify 6-digit code.// Next.js middleware.ts
export function middleware(request: NextRequest) {
const token = request.cookies.get('session-token');
if (!token && request.nextUrl.pathname.startsWith('/dashboard')) {
return NextResponse.redirect(new URL('/login', request.url));
}
}
export const config = { matcher: ['/dashboard/:path*', '/api/protected/:path*'] };
admin, editor, viewer.<Can action="edit" resource="post"> component or usePermissions() hook to conditionally render UI elements.