netlify-identity

Implement user authentication, OAuth, and role-based access control with Netlify Identity.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/JamesMitofsky/tag-archive --skill netlify-identity-jamesmitofsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: netlify-identity
Source: https://github.com/JamesMitofsky/tag-archive/tree/main/.claude/skills/netlify-identity
Command: npx skills add https://github.com/JamesMitofsky/tag-archive --skill netlify-identity-jamesmitofsky

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @netlify/identity, @netlify/functions, and includes references (resource) components.

What problem does it solve? Adding user accounts, logins, and access control to a Netlify-hosted app involves coordinating dashboard-only configuration, OAuth provider setup, JWT session handling, and role enforcement — with no public API for the dashboard side. This Skill guides the full flow so auth works end-to-end without rework. ## Core Features & Use Cases - Headless auth with @netlify/identity: Implement signup, login, logout, OAuth (Google, GitHub, GitLab, Bitbucket), password recovery, and invite acceptance using the recommended TypeScript library. - Dashboard handoff checklists: Generate copy-pasteable configuration steps for enabling Identity, registration mode, autoconfirm, and external providers between draft and production deploys. - Role-based access control: Assign roles via Identity event functions, enforce authorization server-side in Netlify Functions, and configure role-based redirects in netlify.toml. - Use Case: You are building a prototype that needs email/password plus Google sign-in with an admin area. The Skill scaffolds the auth UI driven by getSettings(), writes a userSignup event function that assigns roles, and hands you the exact dashboard checklist before the production deploy. ## Quick Start Add Netlify Identity authentication with email/password and Google OAuth login to my Netlify site, including the dashboard setup checklist.

Frequently Asked Questions about netlify-identity

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

FAQPage Schema
How do I add user login and signup to a Netlify site?

Install @netlify/identity and call signup(), login(), and getUser() from your app code. You must also enable Identity in the Netlify dashboard under project configuration before any auth flow works, since there is no public API for that configuration.

Should I use @netlify/identity or netlify-identity-widget?

Use @netlify/identity for new projects. It provides a unified headless TypeScript API that works in browsers and server contexts like Netlify Functions. The netlify-identity-widget and gotrue-js still work but are no longer recommended.

Does Netlify Identity work with netlify dev for local testing?

No, Identity does not currently work with netlify dev. You must deploy to Netlify to test auth features, using npx netlify deploy for preview deploys during development.

How do I add Google or GitHub OAuth login with Netlify Identity?

Enable the provider in the Netlify dashboard using the "Use Netlify's app" option, which requires no client_id or secret. In code, call oauthLogin(provider) to redirect and handleAuthCallback() on page load to process the return.

Why doesn't a role change take effect immediately for a logged-in user?

Roles are baked into the nf_jwt token when issued and stay valid until expiry, about an hour. The user must log out and back in, or wait for a token refresh, before updated roles apply to redirects and server-side checks.

Are role-based redirects in netlify.toml enough to protect admin pages?

No. Role conditions in redirects only apply to CDN document requests, so SPA client-side navigation bypasses them and bundled code is downloadable by anyone. Enforce sensitive access server-side in a Netlify Function that checks app_metadata.roles.