netlify-identity
Netlify Identity
Use @netlify/identity (npm). For new projects it replaces the legacy netlify-identity-widget and gotrue-js — do not reach for those.
npm install @netlify/identity
Framework examples (Next.js/Astro/Remix/SvelteKit) and the full API reference are in the @netlify/identity README on npm.
Identity does not run under
netlify dev. Test all auth flows on a deploy — Deploy Previews work. Local dev will not complete signup/login/OAuth.
Identity config is dashboard-only — there is no public API. Never curl
api.netlify.comto flip or read Identity settings, never read tokens from local Netlify config, never probe undocumented endpoints. Enable and configure Identity athttps://app.netlify.com/projects/{site_name}/identity.
Never build a from-scratch OAuth flow alongside Identity. No provider app registration in code, no
client_id/secretin source, no custom callback token exchange. UseoauthLogin()+handleAuthCallback(). Raw OAuth beside Identity is the most common source of rework.