Lightlines
By clerk

clerk-nextjs-patterns

clerk39.7k installs

Build safer Clerk authentication into Next.js.

What it does

Applies advanced Clerk authentication patterns to Next.js middleware, Server Actions, API routes, and caching.

When to use it

Use when implementing server or client authentication, middleware, protected actions, API authorization, or user-scoped caching.

How to use it

It changes how the agent implements Clerk authentication in a Next.js project, including which server and client APIs it uses.

What you provide

  • An existing project

Uses

Security reviews

Not yet reviewed.


What you need · 5

Requires the Clerk SDK for Next.js server APIs and client hooks.

Required for Clerk authentication; the files do not state how the skill obtains it.

Required for Clerk authentication; the files do not state how the skill obtains it.

Read from the environment for the optional manual JWT verification path using @clerk/backend.


Access · 0

No additional actions listed.