Secure sign-in and protected pages for Next.js.
Guides implementation of sign-in, protected routes, sessions, and role-based access in Next.js applications.
When to use it
Use when setting up authentication providers, protecting routes, managing server-side authentication, or adding role-based access.
It changes how the agent implements authentication and access control in a Next.js project.
What you provide
The implementation patterns require a Next.js 15+ project using the App Router.
Requires AUTH_SECRET as an environment variable; instructs generating it with openssl and setting it in .env.local.
Reads the GitHub OAuth client ID from the environment when GitHub sign-in is configured, together with GITHUB_SECRET.
This skill
next-auth
Installs the Auth.js beta