Skip to content
netlify avatar

Netlify Identity

Secure authentication for Netlify sites using @netlify/identity, covering signup, OAuth, roles, and event hooks.

CCM score
71 of 100
skills.sh installs
3.4K
GitHub stars
57
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers client login, signup, logout, and OAuth flows, plus server-side getUser() checks in Netlify and Edge Functions
  • Includes handleAuthCallback() and acceptInvite() for OAuth, email confirmation, recovery, and invite callbacks
  • Enforces verifyRequestOrigin(req) on server-side login, signup, and logout endpoints to block cross-site request forgery
  • Designed for Netlify projects that need member gating, role-based access control, or Identity event functions like signup validation

Install

$ npx -y skills add netlify/context-and-tools --skill netlify-identity -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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.com to flip or read Identity settings, never read tokens from local Netlify config, and never probe undocumented endpoints. Enable and configure Identity at https://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/secret in source, and no custom callback token exchange. Use oauthLogin() + handleAuthCallback(). Raw OAuth beside Identity is the most common source of rework.

Client auth (browser)

Details

Repository
github.com/netlify/context-and-tools
Categories
Backend & APIs, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the netlify-identity skill do?

The netlify-identity skill adds user authentication to a Netlify site with @netlify/identity. It covers signup, login, logout, Google, GitHub, GitLab and Bitbucket OAuth, server-side getUser() checks, role-based access control and Identity event functions.

How do I install the netlify-identity skill?

Run npx -y skills add netlify/context-and-tools --skill netlify-identity -y in your project. After that, the agent can help you add login, signup and role checks using @netlify/identity.

Where does netlify-identity stand in the Backend & APIs category?

netlify-identity is listed in the Backend & APIs category alongside entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its own focus is user authentication on Netlify, including OAuth providers and role-based access.

Does netlify-identity work with netlify dev for local testing?

No, Identity does not run under netlify dev, so netlify-identity flows must be tested on a deploy. Deploy Previews work, but local dev will not complete signup, login or OAuth.

Can netlify-identity handle invited users and role checks?

Yes, netlify-identity covers accepting user invites with acceptInvite() and gating routes by roles through user.roles. It also covers assigning roles at signup from Identity event functions.

More from netlify/context-and-tools

All 12

Similar to Netlify Identity

More Backend & APIs