Lightlines
By giuseppe-trisciuoglio

nextjs-authentication

giuseppe-trisciuoglio3.6k installs

Secure sign-in and protected pages for Next.js.

What it does

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.

How to use it

It changes how the agent implements authentication and access control in a Next.js project.

What you provide

  • An existing project

Uses

Latest review

What you need · 6

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.


Access · 1

This skill

next-auth

Execute

Installs the Auth.js beta