neon-auth

Implements Managed Better Auth identity and login flows on Neon Postgres.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/akira777777/vladfsBET --skill neon-auth-akira777777
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-auth
Source: https://github.com/akira777777/vladfsBET/tree/main/.grok/skills/neon-auth
Command: npx skills add https://github.com/akira777777/vladfsBET --skill neon-auth-akira777777

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @neondatabase/auth, @neondatabase/auth-ui, @neondatabase/neon-js, and includes references (resource) components.

What problem does it solve? Adding authentication to a new app involves choosing an identity provider, wiring sign-up/sign-in flows, handling email delivery, and managing sessions. This Skill routes those decisions and implements Neon Auth (Managed Better Auth) so users, sessions, and auth config live in the neon_auth schema on your Lakebase Postgres branch. ## Core Features & Use Cases - Identity routing: Decides between Managed Better Auth, self-managed Better Auth, or keeping an existing provider (Clerk, Supabase Auth, Auth.js) based on required features like MFA, passkeys, SSO, or generic OAuth. - Managed login implementation: Covers email/password, social OAuth (Google, GitHub, Vercel), email OTP, magic links, organizations, phone OTP, and JWT issuance via @neondatabase/auth for Next.js, React/Vite, and TanStack. - Supabase Auth migration: Guides explicit migrations from Supabase Auth to Managed Better Auth, including adapter usage and password-hash limitations. - Use Case: You are building a Next.js app on Neon with no existing auth. The Skill enables auth: true in neon.ts, deploys, then implements sign-up, sign-in, sign-out, session restoration, and protected routes with createNeonAuth and middleware. ## Quick Start Ask the AI to add login with Neon Auth to your Next.js app and protect the account routes.

Frequently Asked Questions about neon-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to a Next.js app with Neon?▼

Enable Managed Auth by adding `auth: true` to `neon.ts` and running `neon deploy`, then create the server with `createNeonAuth` from `@neondatabase/auth/next/server` and a catch-all route handler. Protect pages with `auth.middleware` and a scoped `config.matcher`.

Should I use Neon Managed Auth or self-managed Better Auth?▼

Default to Managed Better Auth when there is no existing identity. Choose self-managed Better Auth only when a required feature like MFA, passkeys, SSO, or generic OAuth is outside Managed support and the installed Better Auth version documents that flow.

Does Neon Auth support migrating from Supabase Auth?▼

Yes, explicit login migrations from Supabase Auth route to Managed Better Auth using the `SupabaseAuthAdapter()` to preserve method shapes like `signInWithPassword`. Password hashes cannot transfer, so users create new accounts or sign in with OAuth.

Why does Neon Auth return an invalid domain error?▼

The invalid domain error means your app origin is missing from the Auth trusted-domain allowlist. Add it with `neon neon-auth domain add https://app.example.com`, including the scheme and omitting any trailing slash, targeting the correct branch.

Can I pass custom Better Auth plugins into @neondatabase/auth?▼

No, the Managed client does not accept a `plugins` option and pins a fixed plugin set. Supported plugins are configured through the Neon Console, API, or CLI; unsupported requirements need self-managed Better Auth.

Does Neon Auth send verification and password reset emails?▼

Yes, Managed Auth sends verification, email OTP, magic-link, and password-reset emails using shared SMTP for getting started. Production requires custom SMTP, and verification links specifically need custom SMTP while codes work on either.