# neon-auth

> Claude/Codex skill by [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 105 stars · Updated 2026-10-23

Add authentication to a new app. Use for "add auth", "add login", Neon Auth (Managed Better Auth), identity routing, sign-up, sign-in, password reset, email OTP, magic links, organizations, phone OTP, OAuth, passkeys, MFA, trusted domains, invalid domain, and @neondatabase/auth. No existing identity: default to Managed Better Auth. Keep working Better Auth, Clerk, Supabase Auth, or another IdP. User asked to migrate from Supabase Auth: Managed Better Auth. A required plugin outside Managed support: self-managed Better Auth on a Neon Function or the existing app host. Also use for auth APIs in @neondatabase/neon-js.

## Install

```sh
git clone https://github.com/neondatabase/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/neon-auth ~/.claude/skills/neon-auth
```

## From README

Neon Auth Neon Auth is Managed Better Auth: users, sessions, and auth config live in the neonauth schema on the branch's Lakebase Postgres, and auth state branches with the database. The client API is the Better Auth method set (signIn.email, signIn.social, getSession) through @neondatabase/auth. That wrapper is not a drop-in for bare better-auth/client: it pins the plugin list and adds Neon-specific OAuth verifier, iframe popup, and JWT handling. Stay on the wrapper while Auth is managed. This skill chooses identity, then implements Managed Better Auth. It does not replace a working auth server in order to use Postgres, Functions, Object Storage, or the AI Gateway. When to Use Inspect existing identity and the required login features before provisioning. A supplied DATABASEURL is not a reason to change identity. Adding a Neon Function is not a reason to change identity. | Situation | What to do | | --- | --- | | No existing auth | Default to Managed Better Auth.

## Links

- HTML page: https://omgskills.com/library/neondatabase/agent-skills/skills/neon-auth/
- GitHub: https://github.com/neondatabase/agent-skills
- Author: [@neondatabase](https://omgskills.com/library/neondatabase/index.md)

## More from this repo

- [neon-postgres](https://omgskills.com/library/neondatabase/agent-skills/neon-postgres/index.md) — Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations,...
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 108 stars
- [neon-postgres-egress-optimizer](https://omgskills.com/library/neondatabase/agent-skills/neon-postgres-egress-optimizer/index.md) — Diagnose and fix excessive Postgres egress (network data transfer) in a codebase.
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 108 stars
- [neon](https://omgskills.com/library/neondatabase/agent-skills/skills/neon/index.md) — Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions,...
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 105 stars
