Lightlines
By next-safe-action

safe-action-better-auth

next-safe-action463 installs

Protect your Next.js actions with Better Auth.

What it does

Guides adding authentication and authorization to Next.js safe actions with typed user and session context.

When to use it

Use when adding authentication or authorization to safe actions with Better Auth.

How to use it

It changes how the agent implements authenticated safe actions, favoring the Better Auth adapter over manual middleware.

What you provide

  • An existing project

Latest review

What you need · 2

Uses next-safe-action to create the action client extended by the authentication adapter.

Requires Next.js; the default unauthorized() behavior requires experimental.authInterrupts to be enabled.


Access · 1

This skill

npm install @next-safe-action/adapter-better-auth better-auth

Execute

Installs Better Auth integration packages