[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-netlify-netlify-identity":3,"mdc-5ir8az-key":33,"related-org-netlify-netlify-identity":6626,"related-repo-netlify-netlify-identity":6806},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"netlify-identity","implement authentication with Netlify Identity","Use when the task involves authentication, user signups, logins, password recovery, OAuth providers, role-based access control, or protecting routes and functions. Always use `@netlify\u002Fidentity` for new projects; `netlify-identity-widget` and `gotrue-js` still work but are no longer recommended.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"netlify","Netlify","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnetlify.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Auth","auth","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Authentication","authentication",{"name":21,"slug":22,"type":15},"OAuth","oauth",24,"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fcontext-and-tools","2026-07-17T05:30:18.295758",null,5,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fcontext-and-tools\u002Ftree\u002FHEAD\u002Fskills\u002Fnetlify-identity","---\nname: netlify-identity\ndescription: Use when the task involves authentication, user signups, logins, password recovery, OAuth providers, role-based access control, or protecting routes and functions. Always use `@netlify\u002Fidentity` for new projects; `netlify-identity-widget` and `gotrue-js` still work but are no longer recommended.\n---\n\n# Netlify Identity\n\nNetlify Identity is a user management service for signups, logins, password recovery, user metadata, and role-based access control. It is built on [GoTrue](https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fgotrue) and issues JSON Web Tokens (JWTs).\n\n**Always use `@netlify\u002Fidentity` for new projects.** `netlify-identity-widget` and `gotrue-js` still work and are maintained, but are no longer the recommended choice. `@netlify\u002Fidentity` provides a unified, headless TypeScript API that works in both browser and server contexts (Netlify Functions, Edge Functions, SSR frameworks).\n\n## Identity is app-level — don't confuse it with site access control\n\nNetlify Identity manages **your app's end users** (signups, logins, roles) and issues the `nf_jwt` cookie. It is a different layer from **Secure Access \u002F Password Protection**, which gates *who can load the site at all* (Basic shared-password is Pro+; team-login\u002FSAML gating is Enterprise), and from **Team\u002FOrg SAML SSO**, which controls *who can log in to the Netlify dashboard*. The same provider can appear in more than one (Google, say): Google as an Identity OAuth provider signs in *app users*; Google as a SAML IdP signs in *Netlify team members*. They are unrelated systems with separate sessions, which is where the confusion comes from.\n\nIf the task involves \"lock this site to my company,\" \"only employees can access it,\" password protection, or SSO at the site\u002Fteam level, **read the `netlify-access-control` skill first** to pick the right layer. This skill covers the app-level user-management layer only.\n\n## Dashboard configuration (user handoff required)\n\n**All Identity instance configuration is dashboard-only — there is no public API.** The agent owns the code, deploys, and the handoff checklist; the user owns flipping dashboard settings. Outside of a Netlify Agent Runner deploy, the Identity instance must be enabled in the dashboard before any auth flow will work. If you write Identity code first and only discover this when `\u002F.netlify\u002Fidentity\u002Fsignup` 404s after a production deploy, that's wasted work — surface the dashboard handoff up front instead.\n\n**Dashboard URL pattern:** `https:\u002F\u002Fapp.netlify.com\u002Fprojects\u002F\u003Cproject-slug>\u002Fconfiguration\u002Fidentity` (it's under project configuration — not under Integrations, and not a top-level sidebar item).\n\n### Dashboard-only operations\n\n- **Enable Identity** — turns the Identity instance on for the site. **Required** before any auth flow works.\n- **Registration mode** — Open (anyone can sign up, the default) or Invite only.\n- **Autoconfirm** — ON skips the email-confirmation step on signup; OFF requires the new user to click a confirmation email before they can log in.\n- **External providers** — Add Google \u002F GitHub \u002F GitLab \u002F Bitbucket. The \"Use Netlify's app\" option means no `client_id`\u002F`secret` needed — good for prototypes. Adding an OAuth provider does NOT disable email\u002Fpassword — email\u002Fpassword is always available unless the front-end omits it.\n- **Custom email templates \u002F SMTP** — advanced; out of scope for typical prototypes.\n\nThere is no CLI command and no public API for any of these. **Do not** curl `https:\u002F\u002Fapi.netlify.com\u002F...` to flip toggles, **do not** read auth tokens out of `~\u002FLibrary\u002FPreferences\u002Fnetlify\u002Fconfig.json`, and **do not** probe for an undocumented endpoint. Give the user the dashboard URL and exact checklist instead.\n\n### Agent\u002Fuser sequence\n\n1. Agent asks any missing auth-shape questions before scaffolding.\n2. Agent writes the Identity code and runs a draft deploy.\n3. User enables Identity and any OAuth providers in the dashboard using the handoff checklist.\n4. Agent verifies the draft URL and then runs the production deploy.\n\n### Recommended settings per use case\n\n| Use case | Registration | Autoconfirm | External providers |\n|---|---|---|---|\n| Prototype \u002F demo | Open | ON | as requested |\n| Production with email signup | Open or Invite per product | OFF (real email confirmation) | configured with custom email templates \u002F SMTP as needed |\n\n### Handoff checklist\n\nWhen the dashboard work is needed, give the user a copy-pasteable checklist **between the draft deploy and the production deploy** — not after the prod deploy fails:\n\n```\nBefore this works end-to-end, flip these in the Netlify dashboard at\nhttps:\u002F\u002Fapp.netlify.com\u002Fprojects\u002F\u003Cyour-slug>\u002Fconfiguration\u002Fidentity:\n\n- [ ] Identity → Enable\n- [ ] Registration → Open (default) or Invite only\n- [ ] Autoconfirm → ON for prototypes; OFF for prod with email confirmation\n- [ ] External providers → Add Google (etc.) with \"Use Netlify's app\"\n\nTell me when these are flipped and I'll run the production deploy.\n```\n\n## Before you build\n\nIf the prompt didn't already specify, ask the user a few short questions before scaffolding any auth code — the answers shape both the dashboard config above and the auth UI you'll write:\n\n- Should the whole site be locked so only your company\u002Fteam can even load it (a perimeter), should it be public with per-user accounts inside the app, or both? This decides whether Netlify Identity alone is enough or you also need site-level access control — if \"company-only\" or \"both\" comes up, check the `netlify-access-control` skill before scaffolding.\n- Which sign-in methods should this app expose: email\u002Fpassword, OAuth, or both?\n- Which parts of the app need authenticated access: the whole app, specific routes, or only specific actions?\n- Who can create accounts: public signup or invite-only?\n- Should new email\u002Fpassword users be able to log in immediately for a prototype (Autoconfirm ON), or confirm by email first for production (Autoconfirm OFF)?\n- Which OAuth providers should be enabled (Google, GitHub, GitLab, Bitbucket)?\n\n**If you don't have preferences here, tell me what you want overall and I'll pick sensible defaults** — typically email\u002Fpassword + Google OAuth, autoconfirm ON, registration Open for a prototype.\n\nAsking these *after* coding causes rework — both the auth UI shape and the dashboard config fall out of these answers.\n\n## When something fails, surface and stop\n\nIf a deploy fails, an Identity callback 404s, an OAuth flow doesn't return, or `\u002F.netlify\u002Fidentity\u002F*` is unreachable — report the failure to the user with the deploy log URL, the exact error, and the site URL, then stop. Do not curl the Netlify API to \"fix\" the Identity instance, do not invent recovery commands, do not bypass the dashboard. Identity instance state has no public API to repair; the recovery is to hand the user the dashboard URL, the setting to check, and the observed failure.\n\n## Never hardcode secrets\n\nNever hardcode secrets. Identity URLs, GoTrue endpoints, and OAuth `client_id`\u002F`secret` values do not belong in client or server code — configure OAuth credentials in the Netlify dashboard, not the frontend, and store anything sensitive as a Netlify environment variable (mark it secret). The Identity **admin token** is not one of these: you don't set or read it — the Netlify Functions runtime injects it automatically for `admin.*` calls made inside a Function (see [Authorization and sessions](references\u002Fauthorization-and-sessions.md)). Never hardcode an admin token or expose admin operations to the browser.\n\n## Setup\n\n```bash\nnpm install @netlify\u002Fidentity\n```\n\nThe Identity instance must be enabled in the dashboard first (see [Dashboard configuration](#dashboard-configuration-user-handoff-required) above). The one exception: a deploy created by a Netlify Agent Runner session that includes Identity code auto-enables the instance.\n\n### Local Development\n\nIdentity does **not** currently work with `netlify dev`. You must deploy to Netlify to test Identity features. Use `npx netlify deploy` for preview deploys during development. This limitation may be resolved in a future release.\n\n## Quick Start\n\nLog in from the browser:\n\n```typescript\nimport { login, getUser } from '@netlify\u002Fidentity'\n\nconst user = await login('user@example.com', '\u003Cpassword>')\nconsole.log(`Hello, ${user.name}`)\n\n\u002F\u002F Later, check auth state\nconst currentUser = await getUser()\n```\n\nProtect a Netlify Function:\n\n```typescript\n\u002F\u002F netlify\u002Ffunctions\u002Fprotected.mts\nimport { getUser } from '@netlify\u002Fidentity'\nimport type { Context } from '@netlify\u002Ffunctions'\n\nexport default async (req: Request, context: Context) => {\n  const user = await getUser()\n  if (!user) return new Response('Unauthorized', { status: 401 })\n  return Response.json({ id: user.id, email: user.email })\n}\n```\n\n`getUser()` reads the request's `nf_jwt` cookie automatically — no argument is needed in a function or edge function. Server-side auth (`getUser`, `login`, `admin.*`) requires a **modern v2 function** (`export default`); v1 Lambda-compatible functions (`export { handler }`) are not supported.\n\n## Core API\n\nImport and use headless functions directly:\n\n```typescript\nimport {\n  getUser,\n  handleAuthCallback,\n  login,\n  logout,\n  signup,\n  oauthLogin,\n  onAuthChange,\n  getSettings,\n} from '@netlify\u002Fidentity'\n```\n\n### Login\n\n```typescript\nimport { login, AuthError } from '@netlify\u002Fidentity'\n\nasync function handleLogin(email: string, password: string) {\n  try {\n    const user = await login(email, password)\n    showSuccess(`Welcome back, ${user.name ?? user.email}`)\n  } catch (error) {\n    if (error instanceof AuthError) {\n      \u002F\u002F Bad credentials → GoTrue returns 400 (invalid_grant) server-side; in the\n      \u002F\u002F browser the status is undefined, so fall back to the message there.\n      showError(error.status === 400 ? 'Invalid email or password.' : error.message)\n    }\n  }\n}\n```\n\n### Signup\n\nAfter signup, check `user.emailVerified` to determine if the user was auto-confirmed or needs to confirm their email.\n\n```typescript\nimport { signup, AuthError } from '@netlify\u002Fidentity'\n\nasync function handleSignup(email: string, password: string, name: string) {\n  try {\n    const user = await signup(email, password, { full_name: name })\n    if (user.emailVerified) {\n      \u002F\u002F Autoconfirm ON — user is logged in immediately\n      showSuccess('Account created. You are now logged in.')\n    } else {\n      \u002F\u002F Autoconfirm OFF — confirmation email sent\n      showSuccess('Check your email to confirm your account.')\n    }\n  } catch (error) {\n    if (error instanceof AuthError) {\n      showError(error.status === 403 ? 'Signups are not allowed.' : error.message)\n    }\n  }\n}\n```\n\n### Logout\n\n```typescript\nimport { logout } from '@netlify\u002Fidentity'\n\nawait logout()\n```\n\n### OAuth\n\n**When Netlify Identity is the goal, never build a from-scratch third-party OAuth flow.** Don't tell the user to go register their own Google\u002FGitHub OAuth app, don't ask for a `client_id`\u002F`secret`, and don't write your own `\u002Fauth\u002Fcallback` token-exchange handler. Identity already brokers the OAuth handshake: the provider is enabled in the dashboard with the **\"Use Netlify's app\"** option (no credentials needed — see the handoff checklist above), and your code just calls `oauthLogin(provider)` + `handleAuthCallback()`. Scaffolding raw OAuth alongside Identity is the single most common source of rework in this flow — it produces two competing auth systems that then have to be untangled by hand. Custom OAuth credentials exist only to *brand* the consent screen, and even then they're pasted into the dashboard, not wired into app code.\n\nOAuth is a two-step flow: `oauthLogin(provider)` redirects away from the site, then `handleAuthCallback()` processes the redirect when the user returns.\n\n```typescript\nimport { oauthLogin } from '@netlify\u002Fidentity'\n\n\u002F\u002F Step 1: Redirect to provider (navigates away — never returns)\nfunction handleOAuthClick(provider: 'google' | 'github' | 'gitlab' | 'bitbucket') {\n  oauthLogin(provider)\n}\n```\n\nProviders must be enabled in the dashboard before `oauthLogin()` works — see [Dashboard configuration](#dashboard-configuration-user-handoff-required) above. Registration is Open by default, so OAuth users can create accounts without any extra signup-related configuration; only the provider itself must be enabled.\n\nEmail\u002Fpassword is always available as a login method — there is **no \"Email provider\" toggle** in Identity settings, only External providers for OAuth. To restrict users to OAuth-only, omit the email\u002Fpassword form from your UI; the front-end is the gate.\n\n### Handling Callbacks\n\nAlways call `handleAuthCallback()` on page load in any app that uses OAuth, password recovery, invites, or email confirmation. It processes all callback types via the URL hash.\n\n```typescript\nimport { handleAuthCallback, AuthError } from '@netlify\u002Fidentity'\n\nasync function processCallback() {\n  try {\n    const result = await handleAuthCallback()\n    if (!result) return \u002F\u002F No callback hash — normal page load\n\n    switch (result.type) {\n      case 'oauth':\n        showSuccess(`Logged in as ${result.user?.email}`)\n        break\n      case 'confirmation':\n        showSuccess('Email confirmed. You are now logged in.')\n        break\n      case 'recovery':\n        \u002F\u002F User is authenticated but must set a new password\n        showPasswordResetForm(result.user)\n        break\n      case 'invite':\n        \u002F\u002F User must set a password to accept the invite\n        showInviteAcceptForm(result.token)\n        break\n      case 'email_change':\n        showSuccess('Email address updated.')\n        break\n    }\n  } catch (error) {\n    if (error instanceof AuthError) showError(error.message)\n  }\n}\n```\n\n### Auth State\n\n```typescript\nimport { getUser, onAuthChange, AUTH_EVENTS } from '@netlify\u002Fidentity'\n\n\u002F\u002F Check current user (never throws — returns null if not authenticated)\nconst user = await getUser()\n\n\u002F\u002F Subscribe to auth state changes (returns unsubscribe function)\nconst unsubscribe = onAuthChange((event, user) => {\n  switch (event) {\n    case AUTH_EVENTS.LOGIN:\n      console.log('Logged in:', user?.email)\n      break\n    case AUTH_EVENTS.LOGOUT:\n      console.log('Logged out')\n      break\n    case AUTH_EVENTS.TOKEN_REFRESH:\n      break\n    case AUTH_EVENTS.USER_UPDATED:\n      console.log('Profile updated:', user?.email)\n      break\n    case AUTH_EVENTS.RECOVERY:\n      console.log('Password recovery initiated')\n      break\n  }\n})\n```\n\n### Settings-Driven UI\n\nYou cannot see a project's live Identity configuration while you are writing the code — there is no API, MCP tool, or CLI command that reports whether Identity is enabled or which providers are on; that state lives in the dashboard. So **don't hard-code which providers exist.** Call `getSettings()` at startup and render the signup form and OAuth buttons from what it returns, so the UI matches whatever the user actually enabled — and a provider you assumed was on but isn't won't render a dead button. (`getSettings()` hits `\u002F.netlify\u002Fidentity\u002Fsettings` and works against any origin serving the page, including localhost under `netlify dev`, which proxies to the live service — but it can't tell you anything pre-run, so ask the user what's configured while you're still scaffolding.)\n\n```typescript\nimport { getSettings } from '@netlify\u002Fidentity'\n\nconst settings = await getSettings()\n\u002F\u002F settings.autoconfirm — boolean\n\u002F\u002F settings.disableSignup — boolean\n\u002F\u002F settings.providers — Record\u003CAuthProvider, boolean>\n\nif (!settings.disableSignup) showSignupForm()\n\nfor (const [provider, enabled] of Object.entries(settings.providers)) {\n  if (enabled) showOAuthButton(provider)\n}\n```\n\n## Minimal React Example\n\n```tsx\nimport { useEffect, useState } from 'react'\nimport {\n  getUser,\n  handleAuthCallback,\n  login,\n  logout,\n  oauthLogin,\n  onAuthChange,\n} from '@netlify\u002Fidentity'\n\nfunction App() {\n  const [user, setUser] = useState(null)\n  const [loading, setLoading] = useState(true)\n\n  useEffect(() => {\n    ;(async () => {\n      await handleAuthCallback()\n      setUser(await getUser())\n      setLoading(false)\n    })()\n    return onAuthChange((_event, currentUser) => setUser(currentUser))\n  }, [])\n\n  const handleLogin = async (email, password) => {\n    const currentUser = await login(email, password)\n    setUser(currentUser)\n  }\n\n  const handleGoogleLogin = () => oauthLogin('google')\n\n  const handleSignOut = async () => {\n    await logout()\n    setUser(null)\n  }\n\n  if (loading) return \u003Cp>Loading...\u003C\u002Fp>\n  \u002F\u002F Render login form or user details based on `user` state\n}\n```\n\n## Error Handling\n\n`@netlify\u002Fidentity` throws two error classes:\n\n- **`AuthError`** — Thrown by auth operations. Has `message`, optional `status` (HTTP status code), and optional `cause`.\n- **`MissingIdentityError`** — Thrown when Identity is not configured in the current environment.\n\n`getUser()` and `isAuthenticated()` never throw — they return `null` and `false` respectively on failure.\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Invalid login credentials — wrong email\u002Fpassword (GoTrue `invalid_grant`) |\n| 401 | Missing, invalid, or expired bearer token on an authenticated endpoint |\n| 403 | Action not allowed (e.g., signups disabled) |\n| 422 | Validation error (e.g., weak password, malformed email) |\n| 404 | User or resource not found |\n\nNote: in the browser, `login()` surfaces gotrue-js failures as an `AuthError` with `status` **undefined** (the HTTP status isn't propagated), so don't branch on `status` for bad-credentials UX there — fall back to `error.message`. Server-side (`login()` in a Function) passes the real status through, so `400` is reliable.\n\n## Identity Event Functions\n\nFunctions can subscribe to Identity lifecycle events by exporting an object whose properties are named event handlers. See the **netlify-functions** skill for the full event-handler pattern.\n\nThe typed handler API below (the `userSignup`\u002F`userValidate`\u002F… object export, the typed `*Event` types, and `event.deny()`) requires **`@netlify\u002Ffunctions` ≥ 5.2.0** — it isn't present in 5.1.x. On older installs, use the legacy filename convention described at the end of this section.\n\n**Available identity handlers:**\n\n| Handler | Trigger |\n|---|---|\n| `userValidate` | User attempts to sign up. Can deny. |\n| `userSignup` | User completes signup. Can deny or mutate. |\n| `userLogin` | User logs in. Can deny or mutate. |\n| `userModified` | User profile is updated. Can deny or mutate. |\n| `userDeleted` | User is deleted. Notification only. |\n\nEach handler receives a typed event with a parsed `user` object (camelCase fields: `appMetadata`, `userMetadata`, `confirmedAt`, etc.).\n\n### Mutate the user\n\nReturn `{ user: ... }` to substitute the user record before it's persisted. This is the common pattern for role assignment at signup.\n\n```typescript\n\u002F\u002F netlify\u002Ffunctions\u002Fidentity.mts\nimport type { UserSignupEvent } from '@netlify\u002Ffunctions'\n\nexport default {\n  userSignup(event: UserSignupEvent) {\n    return {\n      user: {\n        ...event.user,\n        appMetadata: {\n          ...event.user.appMetadata,\n          roles: ['member'],\n        },\n      },\n    }\n  },\n}\n```\n\n### Deny an action\n\nCall `event.deny()` to reject a signup, login, validation, or modification. The end user receives a 401. Do not throw — `event.deny()` is the canonical denial mechanism and does not produce an error in observability.\n\n```typescript\nimport type { UserValidateEvent } from '@netlify\u002Ffunctions'\n\nexport default {\n  userValidate(event: UserValidateEvent) {\n    if (!event.user.email?.endsWith('@example.com')) {\n      return event.deny()\n    }\n  },\n}\n```\n\nIf multiple functions subscribe to the same event, the first to call `event.deny()` aborts the chain — subsequent functions are not invoked.\n\n### Legacy filename convention\n\nThe previous syntax — files named `identity-validate.ts`, `identity-signup.ts`, `identity-login.ts`, exporting `handler` and signaling denial via non-2xx response — still works. New functions should prefer the typed handler syntax above.\n\n## Roles and Authorization\n\n### First Admin User\n\nThe first admin user cannot be created through code alone. You must direct the user to set it up through the Netlify UI:\n\n1. Go to **Project configuration > Identity** in the Netlify dashboard (`https:\u002F\u002Fapp.netlify.com\u002Fprojects\u002F\u003Cproject-slug>\u002Fconfiguration\u002Fidentity`)\n2. Click **Invite users** and enter the admin user's email address\n3. After the user accepts the invite, click the user in the Identity list to open their detail page\n4. In the **Roles** field, add the `admin` role and save\n\nOnce the first admin exists, subsequent users can be managed programmatically using Identity event functions (e.g., assigning roles in `identity-signup`) or role-based redirects.\n\n- **`app_metadata.roles`** — Server-controlled. Only settable via the Netlify UI, admin API, or Identity event functions. Never let users set their own roles.\n- **`user_metadata`** — User-controlled. Users can update via `updateUser({ data: { ... } })`.\n\n### Role-Based Redirects\n\n```toml\n# netlify.toml\n[[redirects]]\n  from = \"\u002Fadmin\u002F*\"\n  to = \"\u002Fadmin\u002F:splat\"\n  status = 200\n  conditions = { Role = [\"admin\"] }\n\n[[redirects]]\n  from = \"\u002Fadmin\u002F*\"\n  to = \"\u002F\"\n  status = 302\n```\n\nRules are evaluated top-to-bottom. The `nf_jwt` cookie is read by the CDN to evaluate role conditions.\n\n## References\n\n- [Advanced patterns](references\u002Fadvanced-patterns.md) — password recovery, invite acceptance, email change, session hydration, SSR integration\n- [Authorization and sessions](references\u002Fauthorization-and-sessions.md) — where role gating is actually enforced (server-side vs client-side \u002F SPA navigation), admin operations being Functions-runtime-only, and why a role change doesn't apply until the JWT refreshes\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,46,63,106,113,176,196,202,220,237,244,322,363,369,393,399,481,487,499,511,517,522,562,572,584,590,603,609,650,656,688,701,707,735,741,746,999,1004,1390,1452,1458,1463,1603,1608,2028,2034,2047,2538,2544,2610,2614,2675,2694,2877,2896,2908,2914,2926,3572,3578,4124,4130,4172,4447,4453,5288,5294,5304,5356,5386,5480,5542,5548,5560,5608,5616,5721,5755,5761,5774,6057,6063,6082,6300,6312,6318,6353,6359,6365,6370,6428,6441,6479,6485,6579,6591,6597,6620],{"type":39,"tag":40,"props":41,"children":42},"element","h1",{"id":4},[43],{"type":44,"value":45},"text","Netlify Identity",{"type":39,"tag":47,"props":48,"children":49},"p",{},[50,52,61],{"type":44,"value":51},"Netlify Identity is a user management service for signups, logins, password recovery, user metadata, and role-based access control. It is built on ",{"type":39,"tag":53,"props":54,"children":58},"a",{"href":55,"rel":56},"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fgotrue",[57],"nofollow",[59],{"type":44,"value":60},"GoTrue",{"type":44,"value":62}," and issues JSON Web Tokens (JWTs).",{"type":39,"tag":47,"props":64,"children":65},{},[66,81,83,89,91,97,99,104],{"type":39,"tag":67,"props":68,"children":69},"strong",{},[70,72,79],{"type":44,"value":71},"Always use ",{"type":39,"tag":73,"props":74,"children":76},"code",{"className":75},[],[77],{"type":44,"value":78},"@netlify\u002Fidentity",{"type":44,"value":80}," for new projects.",{"type":44,"value":82}," ",{"type":39,"tag":73,"props":84,"children":86},{"className":85},[],[87],{"type":44,"value":88},"netlify-identity-widget",{"type":44,"value":90}," and ",{"type":39,"tag":73,"props":92,"children":94},{"className":93},[],[95],{"type":44,"value":96},"gotrue-js",{"type":44,"value":98}," still work and are maintained, but are no longer the recommended choice. ",{"type":39,"tag":73,"props":100,"children":102},{"className":101},[],[103],{"type":44,"value":78},{"type":44,"value":105}," provides a unified, headless TypeScript API that works in both browser and server contexts (Netlify Functions, Edge Functions, SSR frameworks).",{"type":39,"tag":107,"props":108,"children":110},"h2",{"id":109},"identity-is-app-level-dont-confuse-it-with-site-access-control",[111],{"type":44,"value":112},"Identity is app-level — don't confuse it with site access control",{"type":39,"tag":47,"props":114,"children":115},{},[116,118,123,125,131,133,138,140,146,148,153,155,160,162,167,169,174],{"type":44,"value":117},"Netlify Identity manages ",{"type":39,"tag":67,"props":119,"children":120},{},[121],{"type":44,"value":122},"your app's end users",{"type":44,"value":124}," (signups, logins, roles) and issues the ",{"type":39,"tag":73,"props":126,"children":128},{"className":127},[],[129],{"type":44,"value":130},"nf_jwt",{"type":44,"value":132}," cookie. It is a different layer from ",{"type":39,"tag":67,"props":134,"children":135},{},[136],{"type":44,"value":137},"Secure Access \u002F Password Protection",{"type":44,"value":139},", which gates ",{"type":39,"tag":141,"props":142,"children":143},"em",{},[144],{"type":44,"value":145},"who can load the site at all",{"type":44,"value":147}," (Basic shared-password is Pro+; team-login\u002FSAML gating is Enterprise), and from ",{"type":39,"tag":67,"props":149,"children":150},{},[151],{"type":44,"value":152},"Team\u002FOrg SAML SSO",{"type":44,"value":154},", which controls ",{"type":39,"tag":141,"props":156,"children":157},{},[158],{"type":44,"value":159},"who can log in to the Netlify dashboard",{"type":44,"value":161},". The same provider can appear in more than one (Google, say): Google as an Identity OAuth provider signs in ",{"type":39,"tag":141,"props":163,"children":164},{},[165],{"type":44,"value":166},"app users",{"type":44,"value":168},"; Google as a SAML IdP signs in ",{"type":39,"tag":141,"props":170,"children":171},{},[172],{"type":44,"value":173},"Netlify team members",{"type":44,"value":175},". They are unrelated systems with separate sessions, which is where the confusion comes from.",{"type":39,"tag":47,"props":177,"children":178},{},[179,181,194],{"type":44,"value":180},"If the task involves \"lock this site to my company,\" \"only employees can access it,\" password protection, or SSO at the site\u002Fteam level, ",{"type":39,"tag":67,"props":182,"children":183},{},[184,186,192],{"type":44,"value":185},"read the ",{"type":39,"tag":73,"props":187,"children":189},{"className":188},[],[190],{"type":44,"value":191},"netlify-access-control",{"type":44,"value":193}," skill first",{"type":44,"value":195}," to pick the right layer. This skill covers the app-level user-management layer only.",{"type":39,"tag":107,"props":197,"children":199},{"id":198},"dashboard-configuration-user-handoff-required",[200],{"type":44,"value":201},"Dashboard configuration (user handoff required)",{"type":39,"tag":47,"props":203,"children":204},{},[205,210,212,218],{"type":39,"tag":67,"props":206,"children":207},{},[208],{"type":44,"value":209},"All Identity instance configuration is dashboard-only — there is no public API.",{"type":44,"value":211}," The agent owns the code, deploys, and the handoff checklist; the user owns flipping dashboard settings. Outside of a Netlify Agent Runner deploy, the Identity instance must be enabled in the dashboard before any auth flow will work. If you write Identity code first and only discover this when ",{"type":39,"tag":73,"props":213,"children":215},{"className":214},[],[216],{"type":44,"value":217},"\u002F.netlify\u002Fidentity\u002Fsignup",{"type":44,"value":219}," 404s after a production deploy, that's wasted work — surface the dashboard handoff up front instead.",{"type":39,"tag":47,"props":221,"children":222},{},[223,228,229,235],{"type":39,"tag":67,"props":224,"children":225},{},[226],{"type":44,"value":227},"Dashboard URL pattern:",{"type":44,"value":82},{"type":39,"tag":73,"props":230,"children":232},{"className":231},[],[233],{"type":44,"value":234},"https:\u002F\u002Fapp.netlify.com\u002Fprojects\u002F\u003Cproject-slug>\u002Fconfiguration\u002Fidentity",{"type":44,"value":236}," (it's under project configuration — not under Integrations, and not a top-level sidebar item).",{"type":39,"tag":238,"props":239,"children":241},"h3",{"id":240},"dashboard-only-operations",[242],{"type":44,"value":243},"Dashboard-only operations",{"type":39,"tag":245,"props":246,"children":247},"ul",{},[248,266,276,286,312],{"type":39,"tag":249,"props":250,"children":251},"li",{},[252,257,259,264],{"type":39,"tag":67,"props":253,"children":254},{},[255],{"type":44,"value":256},"Enable Identity",{"type":44,"value":258}," — turns the Identity instance on for the site. ",{"type":39,"tag":67,"props":260,"children":261},{},[262],{"type":44,"value":263},"Required",{"type":44,"value":265}," before any auth flow works.",{"type":39,"tag":249,"props":267,"children":268},{},[269,274],{"type":39,"tag":67,"props":270,"children":271},{},[272],{"type":44,"value":273},"Registration mode",{"type":44,"value":275}," — Open (anyone can sign up, the default) or Invite only.",{"type":39,"tag":249,"props":277,"children":278},{},[279,284],{"type":39,"tag":67,"props":280,"children":281},{},[282],{"type":44,"value":283},"Autoconfirm",{"type":44,"value":285}," — ON skips the email-confirmation step on signup; OFF requires the new user to click a confirmation email before they can log in.",{"type":39,"tag":249,"props":287,"children":288},{},[289,294,296,302,304,310],{"type":39,"tag":67,"props":290,"children":291},{},[292],{"type":44,"value":293},"External providers",{"type":44,"value":295}," — Add Google \u002F GitHub \u002F GitLab \u002F Bitbucket. The \"Use Netlify's app\" option means no ",{"type":39,"tag":73,"props":297,"children":299},{"className":298},[],[300],{"type":44,"value":301},"client_id",{"type":44,"value":303},"\u002F",{"type":39,"tag":73,"props":305,"children":307},{"className":306},[],[308],{"type":44,"value":309},"secret",{"type":44,"value":311}," needed — good for prototypes. Adding an OAuth provider does NOT disable email\u002Fpassword — email\u002Fpassword is always available unless the front-end omits it.",{"type":39,"tag":249,"props":313,"children":314},{},[315,320],{"type":39,"tag":67,"props":316,"children":317},{},[318],{"type":44,"value":319},"Custom email templates \u002F SMTP",{"type":44,"value":321}," — advanced; out of scope for typical prototypes.",{"type":39,"tag":47,"props":323,"children":324},{},[325,327,332,334,340,342,347,349,355,357,361],{"type":44,"value":326},"There is no CLI command and no public API for any of these. ",{"type":39,"tag":67,"props":328,"children":329},{},[330],{"type":44,"value":331},"Do not",{"type":44,"value":333}," curl ",{"type":39,"tag":73,"props":335,"children":337},{"className":336},[],[338],{"type":44,"value":339},"https:\u002F\u002Fapi.netlify.com\u002F...",{"type":44,"value":341}," to flip toggles, ",{"type":39,"tag":67,"props":343,"children":344},{},[345],{"type":44,"value":346},"do not",{"type":44,"value":348}," read auth tokens out of ",{"type":39,"tag":73,"props":350,"children":352},{"className":351},[],[353],{"type":44,"value":354},"~\u002FLibrary\u002FPreferences\u002Fnetlify\u002Fconfig.json",{"type":44,"value":356},", and ",{"type":39,"tag":67,"props":358,"children":359},{},[360],{"type":44,"value":346},{"type":44,"value":362}," probe for an undocumented endpoint. Give the user the dashboard URL and exact checklist instead.",{"type":39,"tag":238,"props":364,"children":366},{"id":365},"agentuser-sequence",[367],{"type":44,"value":368},"Agent\u002Fuser sequence",{"type":39,"tag":370,"props":371,"children":372},"ol",{},[373,378,383,388],{"type":39,"tag":249,"props":374,"children":375},{},[376],{"type":44,"value":377},"Agent asks any missing auth-shape questions before scaffolding.",{"type":39,"tag":249,"props":379,"children":380},{},[381],{"type":44,"value":382},"Agent writes the Identity code and runs a draft deploy.",{"type":39,"tag":249,"props":384,"children":385},{},[386],{"type":44,"value":387},"User enables Identity and any OAuth providers in the dashboard using the handoff checklist.",{"type":39,"tag":249,"props":389,"children":390},{},[391],{"type":44,"value":392},"Agent verifies the draft URL and then runs the production deploy.",{"type":39,"tag":238,"props":394,"children":396},{"id":395},"recommended-settings-per-use-case",[397],{"type":44,"value":398},"Recommended settings per use case",{"type":39,"tag":400,"props":401,"children":402},"table",{},[403,430],{"type":39,"tag":404,"props":405,"children":406},"thead",{},[407],{"type":39,"tag":408,"props":409,"children":410},"tr",{},[411,417,422,426],{"type":39,"tag":412,"props":413,"children":414},"th",{},[415],{"type":44,"value":416},"Use case",{"type":39,"tag":412,"props":418,"children":419},{},[420],{"type":44,"value":421},"Registration",{"type":39,"tag":412,"props":423,"children":424},{},[425],{"type":44,"value":283},{"type":39,"tag":412,"props":427,"children":428},{},[429],{"type":44,"value":293},{"type":39,"tag":431,"props":432,"children":433},"tbody",{},[434,458],{"type":39,"tag":408,"props":435,"children":436},{},[437,443,448,453],{"type":39,"tag":438,"props":439,"children":440},"td",{},[441],{"type":44,"value":442},"Prototype \u002F demo",{"type":39,"tag":438,"props":444,"children":445},{},[446],{"type":44,"value":447},"Open",{"type":39,"tag":438,"props":449,"children":450},{},[451],{"type":44,"value":452},"ON",{"type":39,"tag":438,"props":454,"children":455},{},[456],{"type":44,"value":457},"as requested",{"type":39,"tag":408,"props":459,"children":460},{},[461,466,471,476],{"type":39,"tag":438,"props":462,"children":463},{},[464],{"type":44,"value":465},"Production with email signup",{"type":39,"tag":438,"props":467,"children":468},{},[469],{"type":44,"value":470},"Open or Invite per product",{"type":39,"tag":438,"props":472,"children":473},{},[474],{"type":44,"value":475},"OFF (real email confirmation)",{"type":39,"tag":438,"props":477,"children":478},{},[479],{"type":44,"value":480},"configured with custom email templates \u002F SMTP as needed",{"type":39,"tag":238,"props":482,"children":484},{"id":483},"handoff-checklist",[485],{"type":44,"value":486},"Handoff checklist",{"type":39,"tag":47,"props":488,"children":489},{},[490,492,497],{"type":44,"value":491},"When the dashboard work is needed, give the user a copy-pasteable checklist ",{"type":39,"tag":67,"props":493,"children":494},{},[495],{"type":44,"value":496},"between the draft deploy and the production deploy",{"type":44,"value":498}," — not after the prod deploy fails:",{"type":39,"tag":500,"props":501,"children":505},"pre",{"className":502,"code":504,"language":44},[503],"language-text","Before this works end-to-end, flip these in the Netlify dashboard at\nhttps:\u002F\u002Fapp.netlify.com\u002Fprojects\u002F\u003Cyour-slug>\u002Fconfiguration\u002Fidentity:\n\n- [ ] Identity → Enable\n- [ ] Registration → Open (default) or Invite only\n- [ ] Autoconfirm → ON for prototypes; OFF for prod with email confirmation\n- [ ] External providers → Add Google (etc.) with \"Use Netlify's app\"\n\nTell me when these are flipped and I'll run the production deploy.\n",[506],{"type":39,"tag":73,"props":507,"children":509},{"__ignoreMap":508},"",[510],{"type":44,"value":504},{"type":39,"tag":107,"props":512,"children":514},{"id":513},"before-you-build",[515],{"type":44,"value":516},"Before you build",{"type":39,"tag":47,"props":518,"children":519},{},[520],{"type":44,"value":521},"If the prompt didn't already specify, ask the user a few short questions before scaffolding any auth code — the answers shape both the dashboard config above and the auth UI you'll write:",{"type":39,"tag":245,"props":523,"children":524},{},[525,537,542,547,552,557],{"type":39,"tag":249,"props":526,"children":527},{},[528,530,535],{"type":44,"value":529},"Should the whole site be locked so only your company\u002Fteam can even load it (a perimeter), should it be public with per-user accounts inside the app, or both? This decides whether Netlify Identity alone is enough or you also need site-level access control — if \"company-only\" or \"both\" comes up, check the ",{"type":39,"tag":73,"props":531,"children":533},{"className":532},[],[534],{"type":44,"value":191},{"type":44,"value":536}," skill before scaffolding.",{"type":39,"tag":249,"props":538,"children":539},{},[540],{"type":44,"value":541},"Which sign-in methods should this app expose: email\u002Fpassword, OAuth, or both?",{"type":39,"tag":249,"props":543,"children":544},{},[545],{"type":44,"value":546},"Which parts of the app need authenticated access: the whole app, specific routes, or only specific actions?",{"type":39,"tag":249,"props":548,"children":549},{},[550],{"type":44,"value":551},"Who can create accounts: public signup or invite-only?",{"type":39,"tag":249,"props":553,"children":554},{},[555],{"type":44,"value":556},"Should new email\u002Fpassword users be able to log in immediately for a prototype (Autoconfirm ON), or confirm by email first for production (Autoconfirm OFF)?",{"type":39,"tag":249,"props":558,"children":559},{},[560],{"type":44,"value":561},"Which OAuth providers should be enabled (Google, GitHub, GitLab, Bitbucket)?",{"type":39,"tag":47,"props":563,"children":564},{},[565,570],{"type":39,"tag":67,"props":566,"children":567},{},[568],{"type":44,"value":569},"If you don't have preferences here, tell me what you want overall and I'll pick sensible defaults",{"type":44,"value":571}," — typically email\u002Fpassword + Google OAuth, autoconfirm ON, registration Open for a prototype.",{"type":39,"tag":47,"props":573,"children":574},{},[575,577,582],{"type":44,"value":576},"Asking these ",{"type":39,"tag":141,"props":578,"children":579},{},[580],{"type":44,"value":581},"after",{"type":44,"value":583}," coding causes rework — both the auth UI shape and the dashboard config fall out of these answers.",{"type":39,"tag":107,"props":585,"children":587},{"id":586},"when-something-fails-surface-and-stop",[588],{"type":44,"value":589},"When something fails, surface and stop",{"type":39,"tag":47,"props":591,"children":592},{},[593,595,601],{"type":44,"value":594},"If a deploy fails, an Identity callback 404s, an OAuth flow doesn't return, or ",{"type":39,"tag":73,"props":596,"children":598},{"className":597},[],[599],{"type":44,"value":600},"\u002F.netlify\u002Fidentity\u002F*",{"type":44,"value":602}," is unreachable — report the failure to the user with the deploy log URL, the exact error, and the site URL, then stop. Do not curl the Netlify API to \"fix\" the Identity instance, do not invent recovery commands, do not bypass the dashboard. Identity instance state has no public API to repair; the recovery is to hand the user the dashboard URL, the setting to check, and the observed failure.",{"type":39,"tag":107,"props":604,"children":606},{"id":605},"never-hardcode-secrets",[607],{"type":44,"value":608},"Never hardcode secrets",{"type":39,"tag":47,"props":610,"children":611},{},[612,614,619,620,625,627,632,634,640,642,648],{"type":44,"value":613},"Never hardcode secrets. Identity URLs, GoTrue endpoints, and OAuth ",{"type":39,"tag":73,"props":615,"children":617},{"className":616},[],[618],{"type":44,"value":301},{"type":44,"value":303},{"type":39,"tag":73,"props":621,"children":623},{"className":622},[],[624],{"type":44,"value":309},{"type":44,"value":626}," values do not belong in client or server code — configure OAuth credentials in the Netlify dashboard, not the frontend, and store anything sensitive as a Netlify environment variable (mark it secret). The Identity ",{"type":39,"tag":67,"props":628,"children":629},{},[630],{"type":44,"value":631},"admin token",{"type":44,"value":633}," is not one of these: you don't set or read it — the Netlify Functions runtime injects it automatically for ",{"type":39,"tag":73,"props":635,"children":637},{"className":636},[],[638],{"type":44,"value":639},"admin.*",{"type":44,"value":641}," calls made inside a Function (see ",{"type":39,"tag":53,"props":643,"children":645},{"href":644},"references\u002Fauthorization-and-sessions.md",[646],{"type":44,"value":647},"Authorization and sessions",{"type":44,"value":649},"). Never hardcode an admin token or expose admin operations to the browser.",{"type":39,"tag":107,"props":651,"children":653},{"id":652},"setup",[654],{"type":44,"value":655},"Setup",{"type":39,"tag":500,"props":657,"children":661},{"className":658,"code":659,"language":660,"meta":508,"style":508},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @netlify\u002Fidentity\n","bash",[662],{"type":39,"tag":73,"props":663,"children":664},{"__ignoreMap":508},[665],{"type":39,"tag":666,"props":667,"children":670},"span",{"class":668,"line":669},"line",1,[671,677,683],{"type":39,"tag":666,"props":672,"children":674},{"style":673},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[675],{"type":44,"value":676},"npm",{"type":39,"tag":666,"props":678,"children":680},{"style":679},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[681],{"type":44,"value":682}," install",{"type":39,"tag":666,"props":684,"children":685},{"style":679},[686],{"type":44,"value":687}," @netlify\u002Fidentity\n",{"type":39,"tag":47,"props":689,"children":690},{},[691,693,699],{"type":44,"value":692},"The Identity instance must be enabled in the dashboard first (see ",{"type":39,"tag":53,"props":694,"children":696},{"href":695},"#dashboard-configuration-user-handoff-required",[697],{"type":44,"value":698},"Dashboard configuration",{"type":44,"value":700}," above). The one exception: a deploy created by a Netlify Agent Runner session that includes Identity code auto-enables the instance.",{"type":39,"tag":238,"props":702,"children":704},{"id":703},"local-development",[705],{"type":44,"value":706},"Local Development",{"type":39,"tag":47,"props":708,"children":709},{},[710,712,717,719,725,727,733],{"type":44,"value":711},"Identity does ",{"type":39,"tag":67,"props":713,"children":714},{},[715],{"type":44,"value":716},"not",{"type":44,"value":718}," currently work with ",{"type":39,"tag":73,"props":720,"children":722},{"className":721},[],[723],{"type":44,"value":724},"netlify dev",{"type":44,"value":726},". You must deploy to Netlify to test Identity features. Use ",{"type":39,"tag":73,"props":728,"children":730},{"className":729},[],[731],{"type":44,"value":732},"npx netlify deploy",{"type":44,"value":734}," for preview deploys during development. This limitation may be resolved in a future release.",{"type":39,"tag":107,"props":736,"children":738},{"id":737},"quick-start",[739],{"type":44,"value":740},"Quick Start",{"type":39,"tag":47,"props":742,"children":743},{},[744],{"type":44,"value":745},"Log in from the browser:",{"type":39,"tag":500,"props":747,"children":751},{"className":748,"code":749,"language":750,"meta":508,"style":508},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { login, getUser } from '@netlify\u002Fidentity'\n\nconst user = await login('user@example.com', '\u003Cpassword>')\nconsole.log(`Hello, ${user.name}`)\n\n\u002F\u002F Later, check auth state\nconst currentUser = await getUser()\n","typescript",[752],{"type":39,"tag":73,"props":753,"children":754},{"__ignoreMap":508},[755,810,820,891,952,959,969],{"type":39,"tag":666,"props":756,"children":757},{"class":668,"line":669},[758,764,770,776,781,786,791,796,801,805],{"type":39,"tag":666,"props":759,"children":761},{"style":760},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[762],{"type":44,"value":763},"import",{"type":39,"tag":666,"props":765,"children":767},{"style":766},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[768],{"type":44,"value":769}," {",{"type":39,"tag":666,"props":771,"children":773},{"style":772},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[774],{"type":44,"value":775}," login",{"type":39,"tag":666,"props":777,"children":778},{"style":766},[779],{"type":44,"value":780},",",{"type":39,"tag":666,"props":782,"children":783},{"style":772},[784],{"type":44,"value":785}," getUser",{"type":39,"tag":666,"props":787,"children":788},{"style":766},[789],{"type":44,"value":790}," }",{"type":39,"tag":666,"props":792,"children":793},{"style":760},[794],{"type":44,"value":795}," from",{"type":39,"tag":666,"props":797,"children":798},{"style":766},[799],{"type":44,"value":800}," '",{"type":39,"tag":666,"props":802,"children":803},{"style":679},[804],{"type":44,"value":78},{"type":39,"tag":666,"props":806,"children":807},{"style":766},[808],{"type":44,"value":809},"'\n",{"type":39,"tag":666,"props":811,"children":813},{"class":668,"line":812},2,[814],{"type":39,"tag":666,"props":815,"children":817},{"emptyLinePlaceholder":816},true,[818],{"type":44,"value":819},"\n",{"type":39,"tag":666,"props":821,"children":823},{"class":668,"line":822},3,[824,830,835,840,845,850,855,860,865,869,873,877,882,886],{"type":39,"tag":666,"props":825,"children":827},{"style":826},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[828],{"type":44,"value":829},"const",{"type":39,"tag":666,"props":831,"children":832},{"style":772},[833],{"type":44,"value":834}," user ",{"type":39,"tag":666,"props":836,"children":837},{"style":766},[838],{"type":44,"value":839},"=",{"type":39,"tag":666,"props":841,"children":842},{"style":760},[843],{"type":44,"value":844}," await",{"type":39,"tag":666,"props":846,"children":848},{"style":847},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[849],{"type":44,"value":775},{"type":39,"tag":666,"props":851,"children":852},{"style":772},[853],{"type":44,"value":854},"(",{"type":39,"tag":666,"props":856,"children":857},{"style":766},[858],{"type":44,"value":859},"'",{"type":39,"tag":666,"props":861,"children":862},{"style":679},[863],{"type":44,"value":864},"user@example.com",{"type":39,"tag":666,"props":866,"children":867},{"style":766},[868],{"type":44,"value":859},{"type":39,"tag":666,"props":870,"children":871},{"style":766},[872],{"type":44,"value":780},{"type":39,"tag":666,"props":874,"children":875},{"style":766},[876],{"type":44,"value":800},{"type":39,"tag":666,"props":878,"children":879},{"style":679},[880],{"type":44,"value":881},"\u003Cpassword>",{"type":39,"tag":666,"props":883,"children":884},{"style":766},[885],{"type":44,"value":859},{"type":39,"tag":666,"props":887,"children":888},{"style":772},[889],{"type":44,"value":890},")\n",{"type":39,"tag":666,"props":892,"children":894},{"class":668,"line":893},4,[895,900,905,910,914,919,924,929,934,938,943,948],{"type":39,"tag":666,"props":896,"children":897},{"style":772},[898],{"type":44,"value":899},"console",{"type":39,"tag":666,"props":901,"children":902},{"style":766},[903],{"type":44,"value":904},".",{"type":39,"tag":666,"props":906,"children":907},{"style":847},[908],{"type":44,"value":909},"log",{"type":39,"tag":666,"props":911,"children":912},{"style":772},[913],{"type":44,"value":854},{"type":39,"tag":666,"props":915,"children":916},{"style":766},[917],{"type":44,"value":918},"`",{"type":39,"tag":666,"props":920,"children":921},{"style":679},[922],{"type":44,"value":923},"Hello, ",{"type":39,"tag":666,"props":925,"children":926},{"style":766},[927],{"type":44,"value":928},"${",{"type":39,"tag":666,"props":930,"children":931},{"style":772},[932],{"type":44,"value":933},"user",{"type":39,"tag":666,"props":935,"children":936},{"style":766},[937],{"type":44,"value":904},{"type":39,"tag":666,"props":939,"children":940},{"style":772},[941],{"type":44,"value":942},"name",{"type":39,"tag":666,"props":944,"children":945},{"style":766},[946],{"type":44,"value":947},"}`",{"type":39,"tag":666,"props":949,"children":950},{"style":772},[951],{"type":44,"value":890},{"type":39,"tag":666,"props":953,"children":954},{"class":668,"line":27},[955],{"type":39,"tag":666,"props":956,"children":957},{"emptyLinePlaceholder":816},[958],{"type":44,"value":819},{"type":39,"tag":666,"props":960,"children":962},{"class":668,"line":961},6,[963],{"type":39,"tag":666,"props":964,"children":966},{"style":965},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[967],{"type":44,"value":968},"\u002F\u002F Later, check auth state\n",{"type":39,"tag":666,"props":970,"children":972},{"class":668,"line":971},7,[973,977,982,986,990,994],{"type":39,"tag":666,"props":974,"children":975},{"style":826},[976],{"type":44,"value":829},{"type":39,"tag":666,"props":978,"children":979},{"style":772},[980],{"type":44,"value":981}," currentUser ",{"type":39,"tag":666,"props":983,"children":984},{"style":766},[985],{"type":44,"value":839},{"type":39,"tag":666,"props":987,"children":988},{"style":760},[989],{"type":44,"value":844},{"type":39,"tag":666,"props":991,"children":992},{"style":847},[993],{"type":44,"value":785},{"type":39,"tag":666,"props":995,"children":996},{"style":772},[997],{"type":44,"value":998},"()\n",{"type":39,"tag":47,"props":1000,"children":1001},{},[1002],{"type":44,"value":1003},"Protect a Netlify Function:",{"type":39,"tag":500,"props":1005,"children":1007},{"className":748,"code":1006,"language":750,"meta":508,"style":508},"\u002F\u002F netlify\u002Ffunctions\u002Fprotected.mts\nimport { getUser } from '@netlify\u002Fidentity'\nimport type { Context } from '@netlify\u002Ffunctions'\n\nexport default async (req: Request, context: Context) => {\n  const user = await getUser()\n  if (!user) return new Response('Unauthorized', { status: 401 })\n  return Response.json({ id: user.id, email: user.email })\n}\n",[1008],{"type":39,"tag":73,"props":1009,"children":1010},{"__ignoreMap":508},[1011,1019,1054,1096,1103,1174,1205,1294,1381],{"type":39,"tag":666,"props":1012,"children":1013},{"class":668,"line":669},[1014],{"type":39,"tag":666,"props":1015,"children":1016},{"style":965},[1017],{"type":44,"value":1018},"\u002F\u002F netlify\u002Ffunctions\u002Fprotected.mts\n",{"type":39,"tag":666,"props":1020,"children":1021},{"class":668,"line":812},[1022,1026,1030,1034,1038,1042,1046,1050],{"type":39,"tag":666,"props":1023,"children":1024},{"style":760},[1025],{"type":44,"value":763},{"type":39,"tag":666,"props":1027,"children":1028},{"style":766},[1029],{"type":44,"value":769},{"type":39,"tag":666,"props":1031,"children":1032},{"style":772},[1033],{"type":44,"value":785},{"type":39,"tag":666,"props":1035,"children":1036},{"style":766},[1037],{"type":44,"value":790},{"type":39,"tag":666,"props":1039,"children":1040},{"style":760},[1041],{"type":44,"value":795},{"type":39,"tag":666,"props":1043,"children":1044},{"style":766},[1045],{"type":44,"value":800},{"type":39,"tag":666,"props":1047,"children":1048},{"style":679},[1049],{"type":44,"value":78},{"type":39,"tag":666,"props":1051,"children":1052},{"style":766},[1053],{"type":44,"value":809},{"type":39,"tag":666,"props":1055,"children":1056},{"class":668,"line":822},[1057,1061,1066,1070,1075,1079,1083,1087,1092],{"type":39,"tag":666,"props":1058,"children":1059},{"style":760},[1060],{"type":44,"value":763},{"type":39,"tag":666,"props":1062,"children":1063},{"style":760},[1064],{"type":44,"value":1065}," type",{"type":39,"tag":666,"props":1067,"children":1068},{"style":766},[1069],{"type":44,"value":769},{"type":39,"tag":666,"props":1071,"children":1072},{"style":772},[1073],{"type":44,"value":1074}," Context",{"type":39,"tag":666,"props":1076,"children":1077},{"style":766},[1078],{"type":44,"value":790},{"type":39,"tag":666,"props":1080,"children":1081},{"style":760},[1082],{"type":44,"value":795},{"type":39,"tag":666,"props":1084,"children":1085},{"style":766},[1086],{"type":44,"value":800},{"type":39,"tag":666,"props":1088,"children":1089},{"style":679},[1090],{"type":44,"value":1091},"@netlify\u002Ffunctions",{"type":39,"tag":666,"props":1093,"children":1094},{"style":766},[1095],{"type":44,"value":809},{"type":39,"tag":666,"props":1097,"children":1098},{"class":668,"line":893},[1099],{"type":39,"tag":666,"props":1100,"children":1101},{"emptyLinePlaceholder":816},[1102],{"type":44,"value":819},{"type":39,"tag":666,"props":1104,"children":1105},{"class":668,"line":27},[1106,1111,1116,1121,1126,1132,1137,1142,1146,1151,1155,1159,1164,1169],{"type":39,"tag":666,"props":1107,"children":1108},{"style":760},[1109],{"type":44,"value":1110},"export",{"type":39,"tag":666,"props":1112,"children":1113},{"style":760},[1114],{"type":44,"value":1115}," default",{"type":39,"tag":666,"props":1117,"children":1118},{"style":826},[1119],{"type":44,"value":1120}," async",{"type":39,"tag":666,"props":1122,"children":1123},{"style":766},[1124],{"type":44,"value":1125}," (",{"type":39,"tag":666,"props":1127,"children":1129},{"style":1128},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1130],{"type":44,"value":1131},"req",{"type":39,"tag":666,"props":1133,"children":1134},{"style":766},[1135],{"type":44,"value":1136},":",{"type":39,"tag":666,"props":1138,"children":1139},{"style":673},[1140],{"type":44,"value":1141}," Request",{"type":39,"tag":666,"props":1143,"children":1144},{"style":766},[1145],{"type":44,"value":780},{"type":39,"tag":666,"props":1147,"children":1148},{"style":1128},[1149],{"type":44,"value":1150}," context",{"type":39,"tag":666,"props":1152,"children":1153},{"style":766},[1154],{"type":44,"value":1136},{"type":39,"tag":666,"props":1156,"children":1157},{"style":673},[1158],{"type":44,"value":1074},{"type":39,"tag":666,"props":1160,"children":1161},{"style":766},[1162],{"type":44,"value":1163},")",{"type":39,"tag":666,"props":1165,"children":1166},{"style":826},[1167],{"type":44,"value":1168}," =>",{"type":39,"tag":666,"props":1170,"children":1171},{"style":766},[1172],{"type":44,"value":1173}," {\n",{"type":39,"tag":666,"props":1175,"children":1176},{"class":668,"line":961},[1177,1182,1187,1192,1196,1200],{"type":39,"tag":666,"props":1178,"children":1179},{"style":826},[1180],{"type":44,"value":1181},"  const",{"type":39,"tag":666,"props":1183,"children":1184},{"style":772},[1185],{"type":44,"value":1186}," user",{"type":39,"tag":666,"props":1188,"children":1189},{"style":766},[1190],{"type":44,"value":1191}," =",{"type":39,"tag":666,"props":1193,"children":1194},{"style":760},[1195],{"type":44,"value":844},{"type":39,"tag":666,"props":1197,"children":1198},{"style":847},[1199],{"type":44,"value":785},{"type":39,"tag":666,"props":1201,"children":1203},{"style":1202},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1204],{"type":44,"value":998},{"type":39,"tag":666,"props":1206,"children":1207},{"class":668,"line":971},[1208,1213,1217,1222,1226,1231,1236,1241,1246,1250,1254,1259,1263,1267,1271,1276,1280,1286,1290],{"type":39,"tag":666,"props":1209,"children":1210},{"style":760},[1211],{"type":44,"value":1212},"  if",{"type":39,"tag":666,"props":1214,"children":1215},{"style":1202},[1216],{"type":44,"value":1125},{"type":39,"tag":666,"props":1218,"children":1219},{"style":766},[1220],{"type":44,"value":1221},"!",{"type":39,"tag":666,"props":1223,"children":1224},{"style":772},[1225],{"type":44,"value":933},{"type":39,"tag":666,"props":1227,"children":1228},{"style":1202},[1229],{"type":44,"value":1230},") ",{"type":39,"tag":666,"props":1232,"children":1233},{"style":760},[1234],{"type":44,"value":1235},"return",{"type":39,"tag":666,"props":1237,"children":1238},{"style":766},[1239],{"type":44,"value":1240}," new",{"type":39,"tag":666,"props":1242,"children":1243},{"style":847},[1244],{"type":44,"value":1245}," Response",{"type":39,"tag":666,"props":1247,"children":1248},{"style":1202},[1249],{"type":44,"value":854},{"type":39,"tag":666,"props":1251,"children":1252},{"style":766},[1253],{"type":44,"value":859},{"type":39,"tag":666,"props":1255,"children":1256},{"style":679},[1257],{"type":44,"value":1258},"Unauthorized",{"type":39,"tag":666,"props":1260,"children":1261},{"style":766},[1262],{"type":44,"value":859},{"type":39,"tag":666,"props":1264,"children":1265},{"style":766},[1266],{"type":44,"value":780},{"type":39,"tag":666,"props":1268,"children":1269},{"style":766},[1270],{"type":44,"value":769},{"type":39,"tag":666,"props":1272,"children":1273},{"style":1202},[1274],{"type":44,"value":1275}," status",{"type":39,"tag":666,"props":1277,"children":1278},{"style":766},[1279],{"type":44,"value":1136},{"type":39,"tag":666,"props":1281,"children":1283},{"style":1282},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1284],{"type":44,"value":1285}," 401",{"type":39,"tag":666,"props":1287,"children":1288},{"style":766},[1289],{"type":44,"value":790},{"type":39,"tag":666,"props":1291,"children":1292},{"style":1202},[1293],{"type":44,"value":890},{"type":39,"tag":666,"props":1295,"children":1297},{"class":668,"line":1296},8,[1298,1303,1307,1311,1316,1320,1325,1330,1334,1338,1342,1347,1351,1356,1360,1364,1368,1373,1377],{"type":39,"tag":666,"props":1299,"children":1300},{"style":760},[1301],{"type":44,"value":1302},"  return",{"type":39,"tag":666,"props":1304,"children":1305},{"style":772},[1306],{"type":44,"value":1245},{"type":39,"tag":666,"props":1308,"children":1309},{"style":766},[1310],{"type":44,"value":904},{"type":39,"tag":666,"props":1312,"children":1313},{"style":847},[1314],{"type":44,"value":1315},"json",{"type":39,"tag":666,"props":1317,"children":1318},{"style":1202},[1319],{"type":44,"value":854},{"type":39,"tag":666,"props":1321,"children":1322},{"style":766},[1323],{"type":44,"value":1324},"{",{"type":39,"tag":666,"props":1326,"children":1327},{"style":1202},[1328],{"type":44,"value":1329}," id",{"type":39,"tag":666,"props":1331,"children":1332},{"style":766},[1333],{"type":44,"value":1136},{"type":39,"tag":666,"props":1335,"children":1336},{"style":772},[1337],{"type":44,"value":1186},{"type":39,"tag":666,"props":1339,"children":1340},{"style":766},[1341],{"type":44,"value":904},{"type":39,"tag":666,"props":1343,"children":1344},{"style":772},[1345],{"type":44,"value":1346},"id",{"type":39,"tag":666,"props":1348,"children":1349},{"style":766},[1350],{"type":44,"value":780},{"type":39,"tag":666,"props":1352,"children":1353},{"style":1202},[1354],{"type":44,"value":1355}," email",{"type":39,"tag":666,"props":1357,"children":1358},{"style":766},[1359],{"type":44,"value":1136},{"type":39,"tag":666,"props":1361,"children":1362},{"style":772},[1363],{"type":44,"value":1186},{"type":39,"tag":666,"props":1365,"children":1366},{"style":766},[1367],{"type":44,"value":904},{"type":39,"tag":666,"props":1369,"children":1370},{"style":772},[1371],{"type":44,"value":1372},"email",{"type":39,"tag":666,"props":1374,"children":1375},{"style":766},[1376],{"type":44,"value":790},{"type":39,"tag":666,"props":1378,"children":1379},{"style":1202},[1380],{"type":44,"value":890},{"type":39,"tag":666,"props":1382,"children":1384},{"class":668,"line":1383},9,[1385],{"type":39,"tag":666,"props":1386,"children":1387},{"style":766},[1388],{"type":44,"value":1389},"}\n",{"type":39,"tag":47,"props":1391,"children":1392},{},[1393,1399,1401,1406,1408,1414,1416,1422,1423,1428,1430,1435,1436,1442,1444,1450],{"type":39,"tag":73,"props":1394,"children":1396},{"className":1395},[],[1397],{"type":44,"value":1398},"getUser()",{"type":44,"value":1400}," reads the request's ",{"type":39,"tag":73,"props":1402,"children":1404},{"className":1403},[],[1405],{"type":44,"value":130},{"type":44,"value":1407}," cookie automatically — no argument is needed in a function or edge function. Server-side auth (",{"type":39,"tag":73,"props":1409,"children":1411},{"className":1410},[],[1412],{"type":44,"value":1413},"getUser",{"type":44,"value":1415},", ",{"type":39,"tag":73,"props":1417,"children":1419},{"className":1418},[],[1420],{"type":44,"value":1421},"login",{"type":44,"value":1415},{"type":39,"tag":73,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":44,"value":639},{"type":44,"value":1429},") requires a ",{"type":39,"tag":67,"props":1431,"children":1432},{},[1433],{"type":44,"value":1434},"modern v2 function",{"type":44,"value":1125},{"type":39,"tag":73,"props":1437,"children":1439},{"className":1438},[],[1440],{"type":44,"value":1441},"export default",{"type":44,"value":1443},"); v1 Lambda-compatible functions (",{"type":39,"tag":73,"props":1445,"children":1447},{"className":1446},[],[1448],{"type":44,"value":1449},"export { handler }",{"type":44,"value":1451},") are not supported.",{"type":39,"tag":107,"props":1453,"children":1455},{"id":1454},"core-api",[1456],{"type":44,"value":1457},"Core API",{"type":39,"tag":47,"props":1459,"children":1460},{},[1461],{"type":44,"value":1462},"Import and use headless functions directly:",{"type":39,"tag":500,"props":1464,"children":1466},{"className":748,"code":1465,"language":750,"meta":508,"style":508},"import {\n  getUser,\n  handleAuthCallback,\n  login,\n  logout,\n  signup,\n  oauthLogin,\n  onAuthChange,\n  getSettings,\n} from '@netlify\u002Fidentity'\n",[1467],{"type":39,"tag":73,"props":1468,"children":1469},{"__ignoreMap":508},[1470,1481,1494,1506,1518,1530,1542,1554,1566,1578],{"type":39,"tag":666,"props":1471,"children":1472},{"class":668,"line":669},[1473,1477],{"type":39,"tag":666,"props":1474,"children":1475},{"style":760},[1476],{"type":44,"value":763},{"type":39,"tag":666,"props":1478,"children":1479},{"style":766},[1480],{"type":44,"value":1173},{"type":39,"tag":666,"props":1482,"children":1483},{"class":668,"line":812},[1484,1489],{"type":39,"tag":666,"props":1485,"children":1486},{"style":772},[1487],{"type":44,"value":1488},"  getUser",{"type":39,"tag":666,"props":1490,"children":1491},{"style":766},[1492],{"type":44,"value":1493},",\n",{"type":39,"tag":666,"props":1495,"children":1496},{"class":668,"line":822},[1497,1502],{"type":39,"tag":666,"props":1498,"children":1499},{"style":772},[1500],{"type":44,"value":1501},"  handleAuthCallback",{"type":39,"tag":666,"props":1503,"children":1504},{"style":766},[1505],{"type":44,"value":1493},{"type":39,"tag":666,"props":1507,"children":1508},{"class":668,"line":893},[1509,1514],{"type":39,"tag":666,"props":1510,"children":1511},{"style":772},[1512],{"type":44,"value":1513},"  login",{"type":39,"tag":666,"props":1515,"children":1516},{"style":766},[1517],{"type":44,"value":1493},{"type":39,"tag":666,"props":1519,"children":1520},{"class":668,"line":27},[1521,1526],{"type":39,"tag":666,"props":1522,"children":1523},{"style":772},[1524],{"type":44,"value":1525},"  logout",{"type":39,"tag":666,"props":1527,"children":1528},{"style":766},[1529],{"type":44,"value":1493},{"type":39,"tag":666,"props":1531,"children":1532},{"class":668,"line":961},[1533,1538],{"type":39,"tag":666,"props":1534,"children":1535},{"style":772},[1536],{"type":44,"value":1537},"  signup",{"type":39,"tag":666,"props":1539,"children":1540},{"style":766},[1541],{"type":44,"value":1493},{"type":39,"tag":666,"props":1543,"children":1544},{"class":668,"line":971},[1545,1550],{"type":39,"tag":666,"props":1546,"children":1547},{"style":772},[1548],{"type":44,"value":1549},"  oauthLogin",{"type":39,"tag":666,"props":1551,"children":1552},{"style":766},[1553],{"type":44,"value":1493},{"type":39,"tag":666,"props":1555,"children":1556},{"class":668,"line":1296},[1557,1562],{"type":39,"tag":666,"props":1558,"children":1559},{"style":772},[1560],{"type":44,"value":1561},"  onAuthChange",{"type":39,"tag":666,"props":1563,"children":1564},{"style":766},[1565],{"type":44,"value":1493},{"type":39,"tag":666,"props":1567,"children":1568},{"class":668,"line":1383},[1569,1574],{"type":39,"tag":666,"props":1570,"children":1571},{"style":772},[1572],{"type":44,"value":1573},"  getSettings",{"type":39,"tag":666,"props":1575,"children":1576},{"style":766},[1577],{"type":44,"value":1493},{"type":39,"tag":666,"props":1579,"children":1581},{"class":668,"line":1580},10,[1582,1587,1591,1595,1599],{"type":39,"tag":666,"props":1583,"children":1584},{"style":766},[1585],{"type":44,"value":1586},"}",{"type":39,"tag":666,"props":1588,"children":1589},{"style":760},[1590],{"type":44,"value":795},{"type":39,"tag":666,"props":1592,"children":1593},{"style":766},[1594],{"type":44,"value":800},{"type":39,"tag":666,"props":1596,"children":1597},{"style":679},[1598],{"type":44,"value":78},{"type":39,"tag":666,"props":1600,"children":1601},{"style":766},[1602],{"type":44,"value":809},{"type":39,"tag":238,"props":1604,"children":1605},{"id":1421},[1606],{"type":44,"value":1607},"Login",{"type":39,"tag":500,"props":1609,"children":1611},{"className":748,"code":1610,"language":750,"meta":508,"style":508},"import { login, AuthError } from '@netlify\u002Fidentity'\n\nasync function handleLogin(email: string, password: string) {\n  try {\n    const user = await login(email, password)\n    showSuccess(`Welcome back, ${user.name ?? user.email}`)\n  } catch (error) {\n    if (error instanceof AuthError) {\n      \u002F\u002F Bad credentials → GoTrue returns 400 (invalid_grant) server-side; in the\n      \u002F\u002F browser the status is undefined, so fall back to the message there.\n      showError(error.status === 400 ? 'Invalid email or password.' : error.message)\n    }\n  }\n}\n",[1612],{"type":39,"tag":73,"props":1613,"children":1614},{"__ignoreMap":508},[1615,1659,1666,1726,1738,1782,1845,1876,1909,1917,1925,2002,2011,2020],{"type":39,"tag":666,"props":1616,"children":1617},{"class":668,"line":669},[1618,1622,1626,1630,1634,1639,1643,1647,1651,1655],{"type":39,"tag":666,"props":1619,"children":1620},{"style":760},[1621],{"type":44,"value":763},{"type":39,"tag":666,"props":1623,"children":1624},{"style":766},[1625],{"type":44,"value":769},{"type":39,"tag":666,"props":1627,"children":1628},{"style":772},[1629],{"type":44,"value":775},{"type":39,"tag":666,"props":1631,"children":1632},{"style":766},[1633],{"type":44,"value":780},{"type":39,"tag":666,"props":1635,"children":1636},{"style":772},[1637],{"type":44,"value":1638}," AuthError",{"type":39,"tag":666,"props":1640,"children":1641},{"style":766},[1642],{"type":44,"value":790},{"type":39,"tag":666,"props":1644,"children":1645},{"style":760},[1646],{"type":44,"value":795},{"type":39,"tag":666,"props":1648,"children":1649},{"style":766},[1650],{"type":44,"value":800},{"type":39,"tag":666,"props":1652,"children":1653},{"style":679},[1654],{"type":44,"value":78},{"type":39,"tag":666,"props":1656,"children":1657},{"style":766},[1658],{"type":44,"value":809},{"type":39,"tag":666,"props":1660,"children":1661},{"class":668,"line":812},[1662],{"type":39,"tag":666,"props":1663,"children":1664},{"emptyLinePlaceholder":816},[1665],{"type":44,"value":819},{"type":39,"tag":666,"props":1667,"children":1668},{"class":668,"line":822},[1669,1674,1679,1684,1688,1692,1696,1701,1705,1710,1714,1718,1722],{"type":39,"tag":666,"props":1670,"children":1671},{"style":826},[1672],{"type":44,"value":1673},"async",{"type":39,"tag":666,"props":1675,"children":1676},{"style":826},[1677],{"type":44,"value":1678}," function",{"type":39,"tag":666,"props":1680,"children":1681},{"style":847},[1682],{"type":44,"value":1683}," handleLogin",{"type":39,"tag":666,"props":1685,"children":1686},{"style":766},[1687],{"type":44,"value":854},{"type":39,"tag":666,"props":1689,"children":1690},{"style":1128},[1691],{"type":44,"value":1372},{"type":39,"tag":666,"props":1693,"children":1694},{"style":766},[1695],{"type":44,"value":1136},{"type":39,"tag":666,"props":1697,"children":1698},{"style":673},[1699],{"type":44,"value":1700}," string",{"type":39,"tag":666,"props":1702,"children":1703},{"style":766},[1704],{"type":44,"value":780},{"type":39,"tag":666,"props":1706,"children":1707},{"style":1128},[1708],{"type":44,"value":1709}," password",{"type":39,"tag":666,"props":1711,"children":1712},{"style":766},[1713],{"type":44,"value":1136},{"type":39,"tag":666,"props":1715,"children":1716},{"style":673},[1717],{"type":44,"value":1700},{"type":39,"tag":666,"props":1719,"children":1720},{"style":766},[1721],{"type":44,"value":1163},{"type":39,"tag":666,"props":1723,"children":1724},{"style":766},[1725],{"type":44,"value":1173},{"type":39,"tag":666,"props":1727,"children":1728},{"class":668,"line":893},[1729,1734],{"type":39,"tag":666,"props":1730,"children":1731},{"style":760},[1732],{"type":44,"value":1733},"  try",{"type":39,"tag":666,"props":1735,"children":1736},{"style":766},[1737],{"type":44,"value":1173},{"type":39,"tag":666,"props":1739,"children":1740},{"class":668,"line":27},[1741,1746,1750,1754,1758,1762,1766,1770,1774,1778],{"type":39,"tag":666,"props":1742,"children":1743},{"style":826},[1744],{"type":44,"value":1745},"    const",{"type":39,"tag":666,"props":1747,"children":1748},{"style":772},[1749],{"type":44,"value":1186},{"type":39,"tag":666,"props":1751,"children":1752},{"style":766},[1753],{"type":44,"value":1191},{"type":39,"tag":666,"props":1755,"children":1756},{"style":760},[1757],{"type":44,"value":844},{"type":39,"tag":666,"props":1759,"children":1760},{"style":847},[1761],{"type":44,"value":775},{"type":39,"tag":666,"props":1763,"children":1764},{"style":1202},[1765],{"type":44,"value":854},{"type":39,"tag":666,"props":1767,"children":1768},{"style":772},[1769],{"type":44,"value":1372},{"type":39,"tag":666,"props":1771,"children":1772},{"style":766},[1773],{"type":44,"value":780},{"type":39,"tag":666,"props":1775,"children":1776},{"style":772},[1777],{"type":44,"value":1709},{"type":39,"tag":666,"props":1779,"children":1780},{"style":1202},[1781],{"type":44,"value":890},{"type":39,"tag":666,"props":1783,"children":1784},{"class":668,"line":961},[1785,1790,1794,1798,1803,1807,1811,1815,1820,1825,1829,1833,1837,1841],{"type":39,"tag":666,"props":1786,"children":1787},{"style":847},[1788],{"type":44,"value":1789},"    showSuccess",{"type":39,"tag":666,"props":1791,"children":1792},{"style":1202},[1793],{"type":44,"value":854},{"type":39,"tag":666,"props":1795,"children":1796},{"style":766},[1797],{"type":44,"value":918},{"type":39,"tag":666,"props":1799,"children":1800},{"style":679},[1801],{"type":44,"value":1802},"Welcome back, ",{"type":39,"tag":666,"props":1804,"children":1805},{"style":766},[1806],{"type":44,"value":928},{"type":39,"tag":666,"props":1808,"children":1809},{"style":772},[1810],{"type":44,"value":933},{"type":39,"tag":666,"props":1812,"children":1813},{"style":766},[1814],{"type":44,"value":904},{"type":39,"tag":666,"props":1816,"children":1817},{"style":772},[1818],{"type":44,"value":1819},"name ",{"type":39,"tag":666,"props":1821,"children":1822},{"style":766},[1823],{"type":44,"value":1824},"??",{"type":39,"tag":666,"props":1826,"children":1827},{"style":772},[1828],{"type":44,"value":1186},{"type":39,"tag":666,"props":1830,"children":1831},{"style":766},[1832],{"type":44,"value":904},{"type":39,"tag":666,"props":1834,"children":1835},{"style":772},[1836],{"type":44,"value":1372},{"type":39,"tag":666,"props":1838,"children":1839},{"style":766},[1840],{"type":44,"value":947},{"type":39,"tag":666,"props":1842,"children":1843},{"style":1202},[1844],{"type":44,"value":890},{"type":39,"tag":666,"props":1846,"children":1847},{"class":668,"line":971},[1848,1853,1858,1862,1867,1871],{"type":39,"tag":666,"props":1849,"children":1850},{"style":766},[1851],{"type":44,"value":1852},"  }",{"type":39,"tag":666,"props":1854,"children":1855},{"style":760},[1856],{"type":44,"value":1857}," catch",{"type":39,"tag":666,"props":1859,"children":1860},{"style":1202},[1861],{"type":44,"value":1125},{"type":39,"tag":666,"props":1863,"children":1864},{"style":772},[1865],{"type":44,"value":1866},"error",{"type":39,"tag":666,"props":1868,"children":1869},{"style":1202},[1870],{"type":44,"value":1230},{"type":39,"tag":666,"props":1872,"children":1873},{"style":766},[1874],{"type":44,"value":1875},"{\n",{"type":39,"tag":666,"props":1877,"children":1878},{"class":668,"line":1296},[1879,1884,1888,1892,1897,1901,1905],{"type":39,"tag":666,"props":1880,"children":1881},{"style":760},[1882],{"type":44,"value":1883},"    if",{"type":39,"tag":666,"props":1885,"children":1886},{"style":1202},[1887],{"type":44,"value":1125},{"type":39,"tag":666,"props":1889,"children":1890},{"style":772},[1891],{"type":44,"value":1866},{"type":39,"tag":666,"props":1893,"children":1894},{"style":766},[1895],{"type":44,"value":1896}," instanceof",{"type":39,"tag":666,"props":1898,"children":1899},{"style":673},[1900],{"type":44,"value":1638},{"type":39,"tag":666,"props":1902,"children":1903},{"style":1202},[1904],{"type":44,"value":1230},{"type":39,"tag":666,"props":1906,"children":1907},{"style":766},[1908],{"type":44,"value":1875},{"type":39,"tag":666,"props":1910,"children":1911},{"class":668,"line":1383},[1912],{"type":39,"tag":666,"props":1913,"children":1914},{"style":965},[1915],{"type":44,"value":1916},"      \u002F\u002F Bad credentials → GoTrue returns 400 (invalid_grant) server-side; in the\n",{"type":39,"tag":666,"props":1918,"children":1919},{"class":668,"line":1580},[1920],{"type":39,"tag":666,"props":1921,"children":1922},{"style":965},[1923],{"type":44,"value":1924},"      \u002F\u002F browser the status is undefined, so fall back to the message there.\n",{"type":39,"tag":666,"props":1926,"children":1928},{"class":668,"line":1927},11,[1929,1934,1938,1942,1946,1951,1956,1961,1966,1970,1975,1979,1984,1989,1993,1998],{"type":39,"tag":666,"props":1930,"children":1931},{"style":847},[1932],{"type":44,"value":1933},"      showError",{"type":39,"tag":666,"props":1935,"children":1936},{"style":1202},[1937],{"type":44,"value":854},{"type":39,"tag":666,"props":1939,"children":1940},{"style":772},[1941],{"type":44,"value":1866},{"type":39,"tag":666,"props":1943,"children":1944},{"style":766},[1945],{"type":44,"value":904},{"type":39,"tag":666,"props":1947,"children":1948},{"style":772},[1949],{"type":44,"value":1950},"status",{"type":39,"tag":666,"props":1952,"children":1953},{"style":766},[1954],{"type":44,"value":1955}," ===",{"type":39,"tag":666,"props":1957,"children":1958},{"style":1282},[1959],{"type":44,"value":1960}," 400",{"type":39,"tag":666,"props":1962,"children":1963},{"style":766},[1964],{"type":44,"value":1965}," ?",{"type":39,"tag":666,"props":1967,"children":1968},{"style":766},[1969],{"type":44,"value":800},{"type":39,"tag":666,"props":1971,"children":1972},{"style":679},[1973],{"type":44,"value":1974},"Invalid email or password.",{"type":39,"tag":666,"props":1976,"children":1977},{"style":766},[1978],{"type":44,"value":859},{"type":39,"tag":666,"props":1980,"children":1981},{"style":766},[1982],{"type":44,"value":1983}," :",{"type":39,"tag":666,"props":1985,"children":1986},{"style":772},[1987],{"type":44,"value":1988}," error",{"type":39,"tag":666,"props":1990,"children":1991},{"style":766},[1992],{"type":44,"value":904},{"type":39,"tag":666,"props":1994,"children":1995},{"style":772},[1996],{"type":44,"value":1997},"message",{"type":39,"tag":666,"props":1999,"children":2000},{"style":1202},[2001],{"type":44,"value":890},{"type":39,"tag":666,"props":2003,"children":2005},{"class":668,"line":2004},12,[2006],{"type":39,"tag":666,"props":2007,"children":2008},{"style":766},[2009],{"type":44,"value":2010},"    }\n",{"type":39,"tag":666,"props":2012,"children":2014},{"class":668,"line":2013},13,[2015],{"type":39,"tag":666,"props":2016,"children":2017},{"style":766},[2018],{"type":44,"value":2019},"  }\n",{"type":39,"tag":666,"props":2021,"children":2023},{"class":668,"line":2022},14,[2024],{"type":39,"tag":666,"props":2025,"children":2026},{"style":766},[2027],{"type":44,"value":1389},{"type":39,"tag":238,"props":2029,"children":2031},{"id":2030},"signup",[2032],{"type":44,"value":2033},"Signup",{"type":39,"tag":47,"props":2035,"children":2036},{},[2037,2039,2045],{"type":44,"value":2038},"After signup, check ",{"type":39,"tag":73,"props":2040,"children":2042},{"className":2041},[],[2043],{"type":44,"value":2044},"user.emailVerified",{"type":44,"value":2046}," to determine if the user was auto-confirmed or needs to confirm their email.",{"type":39,"tag":500,"props":2048,"children":2050},{"className":748,"code":2049,"language":750,"meta":508,"style":508},"import { signup, AuthError } from '@netlify\u002Fidentity'\n\nasync function handleSignup(email: string, password: string, name: string) {\n  try {\n    const user = await signup(email, password, { full_name: name })\n    if (user.emailVerified) {\n      \u002F\u002F Autoconfirm ON — user is logged in immediately\n      showSuccess('Account created. You are now logged in.')\n    } else {\n      \u002F\u002F Autoconfirm OFF — confirmation email sent\n      showSuccess('Check your email to confirm your account.')\n    }\n  } catch (error) {\n    if (error instanceof AuthError) {\n      showError(error.status === 403 ? 'Signups are not allowed.' : error.message)\n    }\n  }\n}\n",[2051],{"type":39,"tag":73,"props":2052,"children":2053},{"__ignoreMap":508},[2054,2098,2105,2178,2189,2257,2289,2297,2326,2343,2351,2379,2386,2413,2444,2514,2522,2530],{"type":39,"tag":666,"props":2055,"children":2056},{"class":668,"line":669},[2057,2061,2065,2070,2074,2078,2082,2086,2090,2094],{"type":39,"tag":666,"props":2058,"children":2059},{"style":760},[2060],{"type":44,"value":763},{"type":39,"tag":666,"props":2062,"children":2063},{"style":766},[2064],{"type":44,"value":769},{"type":39,"tag":666,"props":2066,"children":2067},{"style":772},[2068],{"type":44,"value":2069}," signup",{"type":39,"tag":666,"props":2071,"children":2072},{"style":766},[2073],{"type":44,"value":780},{"type":39,"tag":666,"props":2075,"children":2076},{"style":772},[2077],{"type":44,"value":1638},{"type":39,"tag":666,"props":2079,"children":2080},{"style":766},[2081],{"type":44,"value":790},{"type":39,"tag":666,"props":2083,"children":2084},{"style":760},[2085],{"type":44,"value":795},{"type":39,"tag":666,"props":2087,"children":2088},{"style":766},[2089],{"type":44,"value":800},{"type":39,"tag":666,"props":2091,"children":2092},{"style":679},[2093],{"type":44,"value":78},{"type":39,"tag":666,"props":2095,"children":2096},{"style":766},[2097],{"type":44,"value":809},{"type":39,"tag":666,"props":2099,"children":2100},{"class":668,"line":812},[2101],{"type":39,"tag":666,"props":2102,"children":2103},{"emptyLinePlaceholder":816},[2104],{"type":44,"value":819},{"type":39,"tag":666,"props":2106,"children":2107},{"class":668,"line":822},[2108,2112,2116,2121,2125,2129,2133,2137,2141,2145,2149,2153,2157,2162,2166,2170,2174],{"type":39,"tag":666,"props":2109,"children":2110},{"style":826},[2111],{"type":44,"value":1673},{"type":39,"tag":666,"props":2113,"children":2114},{"style":826},[2115],{"type":44,"value":1678},{"type":39,"tag":666,"props":2117,"children":2118},{"style":847},[2119],{"type":44,"value":2120}," handleSignup",{"type":39,"tag":666,"props":2122,"children":2123},{"style":766},[2124],{"type":44,"value":854},{"type":39,"tag":666,"props":2126,"children":2127},{"style":1128},[2128],{"type":44,"value":1372},{"type":39,"tag":666,"props":2130,"children":2131},{"style":766},[2132],{"type":44,"value":1136},{"type":39,"tag":666,"props":2134,"children":2135},{"style":673},[2136],{"type":44,"value":1700},{"type":39,"tag":666,"props":2138,"children":2139},{"style":766},[2140],{"type":44,"value":780},{"type":39,"tag":666,"props":2142,"children":2143},{"style":1128},[2144],{"type":44,"value":1709},{"type":39,"tag":666,"props":2146,"children":2147},{"style":766},[2148],{"type":44,"value":1136},{"type":39,"tag":666,"props":2150,"children":2151},{"style":673},[2152],{"type":44,"value":1700},{"type":39,"tag":666,"props":2154,"children":2155},{"style":766},[2156],{"type":44,"value":780},{"type":39,"tag":666,"props":2158,"children":2159},{"style":1128},[2160],{"type":44,"value":2161}," name",{"type":39,"tag":666,"props":2163,"children":2164},{"style":766},[2165],{"type":44,"value":1136},{"type":39,"tag":666,"props":2167,"children":2168},{"style":673},[2169],{"type":44,"value":1700},{"type":39,"tag":666,"props":2171,"children":2172},{"style":766},[2173],{"type":44,"value":1163},{"type":39,"tag":666,"props":2175,"children":2176},{"style":766},[2177],{"type":44,"value":1173},{"type":39,"tag":666,"props":2179,"children":2180},{"class":668,"line":893},[2181,2185],{"type":39,"tag":666,"props":2182,"children":2183},{"style":760},[2184],{"type":44,"value":1733},{"type":39,"tag":666,"props":2186,"children":2187},{"style":766},[2188],{"type":44,"value":1173},{"type":39,"tag":666,"props":2190,"children":2191},{"class":668,"line":27},[2192,2196,2200,2204,2208,2212,2216,2220,2224,2228,2232,2236,2241,2245,2249,2253],{"type":39,"tag":666,"props":2193,"children":2194},{"style":826},[2195],{"type":44,"value":1745},{"type":39,"tag":666,"props":2197,"children":2198},{"style":772},[2199],{"type":44,"value":1186},{"type":39,"tag":666,"props":2201,"children":2202},{"style":766},[2203],{"type":44,"value":1191},{"type":39,"tag":666,"props":2205,"children":2206},{"style":760},[2207],{"type":44,"value":844},{"type":39,"tag":666,"props":2209,"children":2210},{"style":847},[2211],{"type":44,"value":2069},{"type":39,"tag":666,"props":2213,"children":2214},{"style":1202},[2215],{"type":44,"value":854},{"type":39,"tag":666,"props":2217,"children":2218},{"style":772},[2219],{"type":44,"value":1372},{"type":39,"tag":666,"props":2221,"children":2222},{"style":766},[2223],{"type":44,"value":780},{"type":39,"tag":666,"props":2225,"children":2226},{"style":772},[2227],{"type":44,"value":1709},{"type":39,"tag":666,"props":2229,"children":2230},{"style":766},[2231],{"type":44,"value":780},{"type":39,"tag":666,"props":2233,"children":2234},{"style":766},[2235],{"type":44,"value":769},{"type":39,"tag":666,"props":2237,"children":2238},{"style":1202},[2239],{"type":44,"value":2240}," full_name",{"type":39,"tag":666,"props":2242,"children":2243},{"style":766},[2244],{"type":44,"value":1136},{"type":39,"tag":666,"props":2246,"children":2247},{"style":772},[2248],{"type":44,"value":2161},{"type":39,"tag":666,"props":2250,"children":2251},{"style":766},[2252],{"type":44,"value":790},{"type":39,"tag":666,"props":2254,"children":2255},{"style":1202},[2256],{"type":44,"value":890},{"type":39,"tag":666,"props":2258,"children":2259},{"class":668,"line":961},[2260,2264,2268,2272,2276,2281,2285],{"type":39,"tag":666,"props":2261,"children":2262},{"style":760},[2263],{"type":44,"value":1883},{"type":39,"tag":666,"props":2265,"children":2266},{"style":1202},[2267],{"type":44,"value":1125},{"type":39,"tag":666,"props":2269,"children":2270},{"style":772},[2271],{"type":44,"value":933},{"type":39,"tag":666,"props":2273,"children":2274},{"style":766},[2275],{"type":44,"value":904},{"type":39,"tag":666,"props":2277,"children":2278},{"style":772},[2279],{"type":44,"value":2280},"emailVerified",{"type":39,"tag":666,"props":2282,"children":2283},{"style":1202},[2284],{"type":44,"value":1230},{"type":39,"tag":666,"props":2286,"children":2287},{"style":766},[2288],{"type":44,"value":1875},{"type":39,"tag":666,"props":2290,"children":2291},{"class":668,"line":971},[2292],{"type":39,"tag":666,"props":2293,"children":2294},{"style":965},[2295],{"type":44,"value":2296},"      \u002F\u002F Autoconfirm ON — user is logged in immediately\n",{"type":39,"tag":666,"props":2298,"children":2299},{"class":668,"line":1296},[2300,2305,2309,2313,2318,2322],{"type":39,"tag":666,"props":2301,"children":2302},{"style":847},[2303],{"type":44,"value":2304},"      showSuccess",{"type":39,"tag":666,"props":2306,"children":2307},{"style":1202},[2308],{"type":44,"value":854},{"type":39,"tag":666,"props":2310,"children":2311},{"style":766},[2312],{"type":44,"value":859},{"type":39,"tag":666,"props":2314,"children":2315},{"style":679},[2316],{"type":44,"value":2317},"Account created. You are now logged in.",{"type":39,"tag":666,"props":2319,"children":2320},{"style":766},[2321],{"type":44,"value":859},{"type":39,"tag":666,"props":2323,"children":2324},{"style":1202},[2325],{"type":44,"value":890},{"type":39,"tag":666,"props":2327,"children":2328},{"class":668,"line":1383},[2329,2334,2339],{"type":39,"tag":666,"props":2330,"children":2331},{"style":766},[2332],{"type":44,"value":2333},"    }",{"type":39,"tag":666,"props":2335,"children":2336},{"style":760},[2337],{"type":44,"value":2338}," else",{"type":39,"tag":666,"props":2340,"children":2341},{"style":766},[2342],{"type":44,"value":1173},{"type":39,"tag":666,"props":2344,"children":2345},{"class":668,"line":1580},[2346],{"type":39,"tag":666,"props":2347,"children":2348},{"style":965},[2349],{"type":44,"value":2350},"      \u002F\u002F Autoconfirm OFF — confirmation email sent\n",{"type":39,"tag":666,"props":2352,"children":2353},{"class":668,"line":1927},[2354,2358,2362,2366,2371,2375],{"type":39,"tag":666,"props":2355,"children":2356},{"style":847},[2357],{"type":44,"value":2304},{"type":39,"tag":666,"props":2359,"children":2360},{"style":1202},[2361],{"type":44,"value":854},{"type":39,"tag":666,"props":2363,"children":2364},{"style":766},[2365],{"type":44,"value":859},{"type":39,"tag":666,"props":2367,"children":2368},{"style":679},[2369],{"type":44,"value":2370},"Check your email to confirm your account.",{"type":39,"tag":666,"props":2372,"children":2373},{"style":766},[2374],{"type":44,"value":859},{"type":39,"tag":666,"props":2376,"children":2377},{"style":1202},[2378],{"type":44,"value":890},{"type":39,"tag":666,"props":2380,"children":2381},{"class":668,"line":2004},[2382],{"type":39,"tag":666,"props":2383,"children":2384},{"style":766},[2385],{"type":44,"value":2010},{"type":39,"tag":666,"props":2387,"children":2388},{"class":668,"line":2013},[2389,2393,2397,2401,2405,2409],{"type":39,"tag":666,"props":2390,"children":2391},{"style":766},[2392],{"type":44,"value":1852},{"type":39,"tag":666,"props":2394,"children":2395},{"style":760},[2396],{"type":44,"value":1857},{"type":39,"tag":666,"props":2398,"children":2399},{"style":1202},[2400],{"type":44,"value":1125},{"type":39,"tag":666,"props":2402,"children":2403},{"style":772},[2404],{"type":44,"value":1866},{"type":39,"tag":666,"props":2406,"children":2407},{"style":1202},[2408],{"type":44,"value":1230},{"type":39,"tag":666,"props":2410,"children":2411},{"style":766},[2412],{"type":44,"value":1875},{"type":39,"tag":666,"props":2414,"children":2415},{"class":668,"line":2022},[2416,2420,2424,2428,2432,2436,2440],{"type":39,"tag":666,"props":2417,"children":2418},{"style":760},[2419],{"type":44,"value":1883},{"type":39,"tag":666,"props":2421,"children":2422},{"style":1202},[2423],{"type":44,"value":1125},{"type":39,"tag":666,"props":2425,"children":2426},{"style":772},[2427],{"type":44,"value":1866},{"type":39,"tag":666,"props":2429,"children":2430},{"style":766},[2431],{"type":44,"value":1896},{"type":39,"tag":666,"props":2433,"children":2434},{"style":673},[2435],{"type":44,"value":1638},{"type":39,"tag":666,"props":2437,"children":2438},{"style":1202},[2439],{"type":44,"value":1230},{"type":39,"tag":666,"props":2441,"children":2442},{"style":766},[2443],{"type":44,"value":1875},{"type":39,"tag":666,"props":2445,"children":2447},{"class":668,"line":2446},15,[2448,2452,2456,2460,2464,2468,2472,2477,2481,2485,2490,2494,2498,2502,2506,2510],{"type":39,"tag":666,"props":2449,"children":2450},{"style":847},[2451],{"type":44,"value":1933},{"type":39,"tag":666,"props":2453,"children":2454},{"style":1202},[2455],{"type":44,"value":854},{"type":39,"tag":666,"props":2457,"children":2458},{"style":772},[2459],{"type":44,"value":1866},{"type":39,"tag":666,"props":2461,"children":2462},{"style":766},[2463],{"type":44,"value":904},{"type":39,"tag":666,"props":2465,"children":2466},{"style":772},[2467],{"type":44,"value":1950},{"type":39,"tag":666,"props":2469,"children":2470},{"style":766},[2471],{"type":44,"value":1955},{"type":39,"tag":666,"props":2473,"children":2474},{"style":1282},[2475],{"type":44,"value":2476}," 403",{"type":39,"tag":666,"props":2478,"children":2479},{"style":766},[2480],{"type":44,"value":1965},{"type":39,"tag":666,"props":2482,"children":2483},{"style":766},[2484],{"type":44,"value":800},{"type":39,"tag":666,"props":2486,"children":2487},{"style":679},[2488],{"type":44,"value":2489},"Signups are not allowed.",{"type":39,"tag":666,"props":2491,"children":2492},{"style":766},[2493],{"type":44,"value":859},{"type":39,"tag":666,"props":2495,"children":2496},{"style":766},[2497],{"type":44,"value":1983},{"type":39,"tag":666,"props":2499,"children":2500},{"style":772},[2501],{"type":44,"value":1988},{"type":39,"tag":666,"props":2503,"children":2504},{"style":766},[2505],{"type":44,"value":904},{"type":39,"tag":666,"props":2507,"children":2508},{"style":772},[2509],{"type":44,"value":1997},{"type":39,"tag":666,"props":2511,"children":2512},{"style":1202},[2513],{"type":44,"value":890},{"type":39,"tag":666,"props":2515,"children":2517},{"class":668,"line":2516},16,[2518],{"type":39,"tag":666,"props":2519,"children":2520},{"style":766},[2521],{"type":44,"value":2010},{"type":39,"tag":666,"props":2523,"children":2525},{"class":668,"line":2524},17,[2526],{"type":39,"tag":666,"props":2527,"children":2528},{"style":766},[2529],{"type":44,"value":2019},{"type":39,"tag":666,"props":2531,"children":2533},{"class":668,"line":2532},18,[2534],{"type":39,"tag":666,"props":2535,"children":2536},{"style":766},[2537],{"type":44,"value":1389},{"type":39,"tag":238,"props":2539,"children":2541},{"id":2540},"logout",[2542],{"type":44,"value":2543},"Logout",{"type":39,"tag":500,"props":2545,"children":2547},{"className":748,"code":2546,"language":750,"meta":508,"style":508},"import { logout } from '@netlify\u002Fidentity'\n\nawait logout()\n",[2548],{"type":39,"tag":73,"props":2549,"children":2550},{"__ignoreMap":508},[2551,2587,2594],{"type":39,"tag":666,"props":2552,"children":2553},{"class":668,"line":669},[2554,2558,2562,2567,2571,2575,2579,2583],{"type":39,"tag":666,"props":2555,"children":2556},{"style":760},[2557],{"type":44,"value":763},{"type":39,"tag":666,"props":2559,"children":2560},{"style":766},[2561],{"type":44,"value":769},{"type":39,"tag":666,"props":2563,"children":2564},{"style":772},[2565],{"type":44,"value":2566}," logout",{"type":39,"tag":666,"props":2568,"children":2569},{"style":766},[2570],{"type":44,"value":790},{"type":39,"tag":666,"props":2572,"children":2573},{"style":760},[2574],{"type":44,"value":795},{"type":39,"tag":666,"props":2576,"children":2577},{"style":766},[2578],{"type":44,"value":800},{"type":39,"tag":666,"props":2580,"children":2581},{"style":679},[2582],{"type":44,"value":78},{"type":39,"tag":666,"props":2584,"children":2585},{"style":766},[2586],{"type":44,"value":809},{"type":39,"tag":666,"props":2588,"children":2589},{"class":668,"line":812},[2590],{"type":39,"tag":666,"props":2591,"children":2592},{"emptyLinePlaceholder":816},[2593],{"type":44,"value":819},{"type":39,"tag":666,"props":2595,"children":2596},{"class":668,"line":822},[2597,2602,2606],{"type":39,"tag":666,"props":2598,"children":2599},{"style":760},[2600],{"type":44,"value":2601},"await",{"type":39,"tag":666,"props":2603,"children":2604},{"style":847},[2605],{"type":44,"value":2566},{"type":39,"tag":666,"props":2607,"children":2608},{"style":772},[2609],{"type":44,"value":998},{"type":39,"tag":238,"props":2611,"children":2612},{"id":22},[2613],{"type":44,"value":21},{"type":39,"tag":47,"props":2615,"children":2616},{},[2617,2622,2624,2629,2630,2635,2637,2643,2645,2650,2652,2658,2660,2666,2668,2673],{"type":39,"tag":67,"props":2618,"children":2619},{},[2620],{"type":44,"value":2621},"When Netlify Identity is the goal, never build a from-scratch third-party OAuth flow.",{"type":44,"value":2623}," Don't tell the user to go register their own Google\u002FGitHub OAuth app, don't ask for a ",{"type":39,"tag":73,"props":2625,"children":2627},{"className":2626},[],[2628],{"type":44,"value":301},{"type":44,"value":303},{"type":39,"tag":73,"props":2631,"children":2633},{"className":2632},[],[2634],{"type":44,"value":309},{"type":44,"value":2636},", and don't write your own ",{"type":39,"tag":73,"props":2638,"children":2640},{"className":2639},[],[2641],{"type":44,"value":2642},"\u002Fauth\u002Fcallback",{"type":44,"value":2644}," token-exchange handler. Identity already brokers the OAuth handshake: the provider is enabled in the dashboard with the ",{"type":39,"tag":67,"props":2646,"children":2647},{},[2648],{"type":44,"value":2649},"\"Use Netlify's app\"",{"type":44,"value":2651}," option (no credentials needed — see the handoff checklist above), and your code just calls ",{"type":39,"tag":73,"props":2653,"children":2655},{"className":2654},[],[2656],{"type":44,"value":2657},"oauthLogin(provider)",{"type":44,"value":2659}," + ",{"type":39,"tag":73,"props":2661,"children":2663},{"className":2662},[],[2664],{"type":44,"value":2665},"handleAuthCallback()",{"type":44,"value":2667},". Scaffolding raw OAuth alongside Identity is the single most common source of rework in this flow — it produces two competing auth systems that then have to be untangled by hand. Custom OAuth credentials exist only to ",{"type":39,"tag":141,"props":2669,"children":2670},{},[2671],{"type":44,"value":2672},"brand",{"type":44,"value":2674}," the consent screen, and even then they're pasted into the dashboard, not wired into app code.",{"type":39,"tag":47,"props":2676,"children":2677},{},[2678,2680,2685,2687,2692],{"type":44,"value":2679},"OAuth is a two-step flow: ",{"type":39,"tag":73,"props":2681,"children":2683},{"className":2682},[],[2684],{"type":44,"value":2657},{"type":44,"value":2686}," redirects away from the site, then ",{"type":39,"tag":73,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":44,"value":2665},{"type":44,"value":2693}," processes the redirect when the user returns.",{"type":39,"tag":500,"props":2695,"children":2697},{"className":748,"code":2696,"language":750,"meta":508,"style":508},"import { oauthLogin } from '@netlify\u002Fidentity'\n\n\u002F\u002F Step 1: Redirect to provider (navigates away — never returns)\nfunction handleOAuthClick(provider: 'google' | 'github' | 'gitlab' | 'bitbucket') {\n  oauthLogin(provider)\n}\n",[2698],{"type":39,"tag":73,"props":2699,"children":2700},{"__ignoreMap":508},[2701,2737,2744,2752,2851,2870],{"type":39,"tag":666,"props":2702,"children":2703},{"class":668,"line":669},[2704,2708,2712,2717,2721,2725,2729,2733],{"type":39,"tag":666,"props":2705,"children":2706},{"style":760},[2707],{"type":44,"value":763},{"type":39,"tag":666,"props":2709,"children":2710},{"style":766},[2711],{"type":44,"value":769},{"type":39,"tag":666,"props":2713,"children":2714},{"style":772},[2715],{"type":44,"value":2716}," oauthLogin",{"type":39,"tag":666,"props":2718,"children":2719},{"style":766},[2720],{"type":44,"value":790},{"type":39,"tag":666,"props":2722,"children":2723},{"style":760},[2724],{"type":44,"value":795},{"type":39,"tag":666,"props":2726,"children":2727},{"style":766},[2728],{"type":44,"value":800},{"type":39,"tag":666,"props":2730,"children":2731},{"style":679},[2732],{"type":44,"value":78},{"type":39,"tag":666,"props":2734,"children":2735},{"style":766},[2736],{"type":44,"value":809},{"type":39,"tag":666,"props":2738,"children":2739},{"class":668,"line":812},[2740],{"type":39,"tag":666,"props":2741,"children":2742},{"emptyLinePlaceholder":816},[2743],{"type":44,"value":819},{"type":39,"tag":666,"props":2745,"children":2746},{"class":668,"line":822},[2747],{"type":39,"tag":666,"props":2748,"children":2749},{"style":965},[2750],{"type":44,"value":2751},"\u002F\u002F Step 1: Redirect to provider (navigates away — never returns)\n",{"type":39,"tag":666,"props":2753,"children":2754},{"class":668,"line":893},[2755,2760,2765,2769,2774,2778,2782,2787,2791,2796,2800,2805,2809,2813,2817,2822,2826,2830,2834,2839,2843,2847],{"type":39,"tag":666,"props":2756,"children":2757},{"style":826},[2758],{"type":44,"value":2759},"function",{"type":39,"tag":666,"props":2761,"children":2762},{"style":847},[2763],{"type":44,"value":2764}," handleOAuthClick",{"type":39,"tag":666,"props":2766,"children":2767},{"style":766},[2768],{"type":44,"value":854},{"type":39,"tag":666,"props":2770,"children":2771},{"style":1128},[2772],{"type":44,"value":2773},"provider",{"type":39,"tag":666,"props":2775,"children":2776},{"style":766},[2777],{"type":44,"value":1136},{"type":39,"tag":666,"props":2779,"children":2780},{"style":766},[2781],{"type":44,"value":800},{"type":39,"tag":666,"props":2783,"children":2784},{"style":679},[2785],{"type":44,"value":2786},"google",{"type":39,"tag":666,"props":2788,"children":2789},{"style":766},[2790],{"type":44,"value":859},{"type":39,"tag":666,"props":2792,"children":2793},{"style":766},[2794],{"type":44,"value":2795}," |",{"type":39,"tag":666,"props":2797,"children":2798},{"style":766},[2799],{"type":44,"value":800},{"type":39,"tag":666,"props":2801,"children":2802},{"style":679},[2803],{"type":44,"value":2804},"github",{"type":39,"tag":666,"props":2806,"children":2807},{"style":766},[2808],{"type":44,"value":859},{"type":39,"tag":666,"props":2810,"children":2811},{"style":766},[2812],{"type":44,"value":2795},{"type":39,"tag":666,"props":2814,"children":2815},{"style":766},[2816],{"type":44,"value":800},{"type":39,"tag":666,"props":2818,"children":2819},{"style":679},[2820],{"type":44,"value":2821},"gitlab",{"type":39,"tag":666,"props":2823,"children":2824},{"style":766},[2825],{"type":44,"value":859},{"type":39,"tag":666,"props":2827,"children":2828},{"style":766},[2829],{"type":44,"value":2795},{"type":39,"tag":666,"props":2831,"children":2832},{"style":766},[2833],{"type":44,"value":800},{"type":39,"tag":666,"props":2835,"children":2836},{"style":679},[2837],{"type":44,"value":2838},"bitbucket",{"type":39,"tag":666,"props":2840,"children":2841},{"style":766},[2842],{"type":44,"value":859},{"type":39,"tag":666,"props":2844,"children":2845},{"style":766},[2846],{"type":44,"value":1163},{"type":39,"tag":666,"props":2848,"children":2849},{"style":766},[2850],{"type":44,"value":1173},{"type":39,"tag":666,"props":2852,"children":2853},{"class":668,"line":27},[2854,2858,2862,2866],{"type":39,"tag":666,"props":2855,"children":2856},{"style":847},[2857],{"type":44,"value":1549},{"type":39,"tag":666,"props":2859,"children":2860},{"style":1202},[2861],{"type":44,"value":854},{"type":39,"tag":666,"props":2863,"children":2864},{"style":772},[2865],{"type":44,"value":2773},{"type":39,"tag":666,"props":2867,"children":2868},{"style":1202},[2869],{"type":44,"value":890},{"type":39,"tag":666,"props":2871,"children":2872},{"class":668,"line":961},[2873],{"type":39,"tag":666,"props":2874,"children":2875},{"style":766},[2876],{"type":44,"value":1389},{"type":39,"tag":47,"props":2878,"children":2879},{},[2880,2882,2888,2890,2894],{"type":44,"value":2881},"Providers must be enabled in the dashboard before ",{"type":39,"tag":73,"props":2883,"children":2885},{"className":2884},[],[2886],{"type":44,"value":2887},"oauthLogin()",{"type":44,"value":2889}," works — see ",{"type":39,"tag":53,"props":2891,"children":2892},{"href":695},[2893],{"type":44,"value":698},{"type":44,"value":2895}," above. Registration is Open by default, so OAuth users can create accounts without any extra signup-related configuration; only the provider itself must be enabled.",{"type":39,"tag":47,"props":2897,"children":2898},{},[2899,2901,2906],{"type":44,"value":2900},"Email\u002Fpassword is always available as a login method — there is ",{"type":39,"tag":67,"props":2902,"children":2903},{},[2904],{"type":44,"value":2905},"no \"Email provider\" toggle",{"type":44,"value":2907}," in Identity settings, only External providers for OAuth. To restrict users to OAuth-only, omit the email\u002Fpassword form from your UI; the front-end is the gate.",{"type":39,"tag":238,"props":2909,"children":2911},{"id":2910},"handling-callbacks",[2912],{"type":44,"value":2913},"Handling Callbacks",{"type":39,"tag":47,"props":2915,"children":2916},{},[2917,2919,2924],{"type":44,"value":2918},"Always call ",{"type":39,"tag":73,"props":2920,"children":2922},{"className":2921},[],[2923],{"type":44,"value":2665},{"type":44,"value":2925}," on page load in any app that uses OAuth, password recovery, invites, or email confirmation. It processes all callback types via the URL hash.",{"type":39,"tag":500,"props":2927,"children":2929},{"className":748,"code":2928,"language":750,"meta":508,"style":508},"import { handleAuthCallback, AuthError } from '@netlify\u002Fidentity'\n\nasync function processCallback() {\n  try {\n    const result = await handleAuthCallback()\n    if (!result) return \u002F\u002F No callback hash — normal page load\n\n    switch (result.type) {\n      case 'oauth':\n        showSuccess(`Logged in as ${result.user?.email}`)\n        break\n      case 'confirmation':\n        showSuccess('Email confirmed. You are now logged in.')\n        break\n      case 'recovery':\n        \u002F\u002F User is authenticated but must set a new password\n        showPasswordResetForm(result.user)\n        break\n      case 'invite':\n        \u002F\u002F User must set a password to accept the invite\n        showInviteAcceptForm(result.token)\n        break\n      case 'email_change':\n        showSuccess('Email address updated.')\n        break\n    }\n  } catch (error) {\n    if (error instanceof AuthError) showError(error.message)\n  }\n}\n",[2930],{"type":39,"tag":73,"props":2931,"children":2932},{"__ignoreMap":508},[2933,2977,2984,3009,3020,3048,3081,3088,3121,3146,3200,3208,3232,3260,3267,3291,3299,3327,3334,3359,3368,3398,3406,3431,3459,3467,3475,3503,3556,3564],{"type":39,"tag":666,"props":2934,"children":2935},{"class":668,"line":669},[2936,2940,2944,2949,2953,2957,2961,2965,2969,2973],{"type":39,"tag":666,"props":2937,"children":2938},{"style":760},[2939],{"type":44,"value":763},{"type":39,"tag":666,"props":2941,"children":2942},{"style":766},[2943],{"type":44,"value":769},{"type":39,"tag":666,"props":2945,"children":2946},{"style":772},[2947],{"type":44,"value":2948}," handleAuthCallback",{"type":39,"tag":666,"props":2950,"children":2951},{"style":766},[2952],{"type":44,"value":780},{"type":39,"tag":666,"props":2954,"children":2955},{"style":772},[2956],{"type":44,"value":1638},{"type":39,"tag":666,"props":2958,"children":2959},{"style":766},[2960],{"type":44,"value":790},{"type":39,"tag":666,"props":2962,"children":2963},{"style":760},[2964],{"type":44,"value":795},{"type":39,"tag":666,"props":2966,"children":2967},{"style":766},[2968],{"type":44,"value":800},{"type":39,"tag":666,"props":2970,"children":2971},{"style":679},[2972],{"type":44,"value":78},{"type":39,"tag":666,"props":2974,"children":2975},{"style":766},[2976],{"type":44,"value":809},{"type":39,"tag":666,"props":2978,"children":2979},{"class":668,"line":812},[2980],{"type":39,"tag":666,"props":2981,"children":2982},{"emptyLinePlaceholder":816},[2983],{"type":44,"value":819},{"type":39,"tag":666,"props":2985,"children":2986},{"class":668,"line":822},[2987,2991,2995,3000,3005],{"type":39,"tag":666,"props":2988,"children":2989},{"style":826},[2990],{"type":44,"value":1673},{"type":39,"tag":666,"props":2992,"children":2993},{"style":826},[2994],{"type":44,"value":1678},{"type":39,"tag":666,"props":2996,"children":2997},{"style":847},[2998],{"type":44,"value":2999}," processCallback",{"type":39,"tag":666,"props":3001,"children":3002},{"style":766},[3003],{"type":44,"value":3004},"()",{"type":39,"tag":666,"props":3006,"children":3007},{"style":766},[3008],{"type":44,"value":1173},{"type":39,"tag":666,"props":3010,"children":3011},{"class":668,"line":893},[3012,3016],{"type":39,"tag":666,"props":3013,"children":3014},{"style":760},[3015],{"type":44,"value":1733},{"type":39,"tag":666,"props":3017,"children":3018},{"style":766},[3019],{"type":44,"value":1173},{"type":39,"tag":666,"props":3021,"children":3022},{"class":668,"line":27},[3023,3027,3032,3036,3040,3044],{"type":39,"tag":666,"props":3024,"children":3025},{"style":826},[3026],{"type":44,"value":1745},{"type":39,"tag":666,"props":3028,"children":3029},{"style":772},[3030],{"type":44,"value":3031}," result",{"type":39,"tag":666,"props":3033,"children":3034},{"style":766},[3035],{"type":44,"value":1191},{"type":39,"tag":666,"props":3037,"children":3038},{"style":760},[3039],{"type":44,"value":844},{"type":39,"tag":666,"props":3041,"children":3042},{"style":847},[3043],{"type":44,"value":2948},{"type":39,"tag":666,"props":3045,"children":3046},{"style":1202},[3047],{"type":44,"value":998},{"type":39,"tag":666,"props":3049,"children":3050},{"class":668,"line":961},[3051,3055,3059,3063,3068,3072,3076],{"type":39,"tag":666,"props":3052,"children":3053},{"style":760},[3054],{"type":44,"value":1883},{"type":39,"tag":666,"props":3056,"children":3057},{"style":1202},[3058],{"type":44,"value":1125},{"type":39,"tag":666,"props":3060,"children":3061},{"style":766},[3062],{"type":44,"value":1221},{"type":39,"tag":666,"props":3064,"children":3065},{"style":772},[3066],{"type":44,"value":3067},"result",{"type":39,"tag":666,"props":3069,"children":3070},{"style":1202},[3071],{"type":44,"value":1230},{"type":39,"tag":666,"props":3073,"children":3074},{"style":760},[3075],{"type":44,"value":1235},{"type":39,"tag":666,"props":3077,"children":3078},{"style":965},[3079],{"type":44,"value":3080}," \u002F\u002F No callback hash — normal page load\n",{"type":39,"tag":666,"props":3082,"children":3083},{"class":668,"line":971},[3084],{"type":39,"tag":666,"props":3085,"children":3086},{"emptyLinePlaceholder":816},[3087],{"type":44,"value":819},{"type":39,"tag":666,"props":3089,"children":3090},{"class":668,"line":1296},[3091,3096,3100,3104,3108,3113,3117],{"type":39,"tag":666,"props":3092,"children":3093},{"style":760},[3094],{"type":44,"value":3095},"    switch",{"type":39,"tag":666,"props":3097,"children":3098},{"style":1202},[3099],{"type":44,"value":1125},{"type":39,"tag":666,"props":3101,"children":3102},{"style":772},[3103],{"type":44,"value":3067},{"type":39,"tag":666,"props":3105,"children":3106},{"style":766},[3107],{"type":44,"value":904},{"type":39,"tag":666,"props":3109,"children":3110},{"style":772},[3111],{"type":44,"value":3112},"type",{"type":39,"tag":666,"props":3114,"children":3115},{"style":1202},[3116],{"type":44,"value":1230},{"type":39,"tag":666,"props":3118,"children":3119},{"style":766},[3120],{"type":44,"value":1875},{"type":39,"tag":666,"props":3122,"children":3123},{"class":668,"line":1383},[3124,3129,3133,3137,3141],{"type":39,"tag":666,"props":3125,"children":3126},{"style":760},[3127],{"type":44,"value":3128},"      case",{"type":39,"tag":666,"props":3130,"children":3131},{"style":766},[3132],{"type":44,"value":800},{"type":39,"tag":666,"props":3134,"children":3135},{"style":679},[3136],{"type":44,"value":22},{"type":39,"tag":666,"props":3138,"children":3139},{"style":766},[3140],{"type":44,"value":859},{"type":39,"tag":666,"props":3142,"children":3143},{"style":766},[3144],{"type":44,"value":3145},":\n",{"type":39,"tag":666,"props":3147,"children":3148},{"class":668,"line":1580},[3149,3154,3158,3162,3167,3171,3175,3179,3183,3188,3192,3196],{"type":39,"tag":666,"props":3150,"children":3151},{"style":847},[3152],{"type":44,"value":3153},"        showSuccess",{"type":39,"tag":666,"props":3155,"children":3156},{"style":1202},[3157],{"type":44,"value":854},{"type":39,"tag":666,"props":3159,"children":3160},{"style":766},[3161],{"type":44,"value":918},{"type":39,"tag":666,"props":3163,"children":3164},{"style":679},[3165],{"type":44,"value":3166},"Logged in as ",{"type":39,"tag":666,"props":3168,"children":3169},{"style":766},[3170],{"type":44,"value":928},{"type":39,"tag":666,"props":3172,"children":3173},{"style":772},[3174],{"type":44,"value":3067},{"type":39,"tag":666,"props":3176,"children":3177},{"style":766},[3178],{"type":44,"value":904},{"type":39,"tag":666,"props":3180,"children":3181},{"style":772},[3182],{"type":44,"value":933},{"type":39,"tag":666,"props":3184,"children":3185},{"style":766},[3186],{"type":44,"value":3187},"?.",{"type":39,"tag":666,"props":3189,"children":3190},{"style":772},[3191],{"type":44,"value":1372},{"type":39,"tag":666,"props":3193,"children":3194},{"style":766},[3195],{"type":44,"value":947},{"type":39,"tag":666,"props":3197,"children":3198},{"style":1202},[3199],{"type":44,"value":890},{"type":39,"tag":666,"props":3201,"children":3202},{"class":668,"line":1927},[3203],{"type":39,"tag":666,"props":3204,"children":3205},{"style":760},[3206],{"type":44,"value":3207},"        break\n",{"type":39,"tag":666,"props":3209,"children":3210},{"class":668,"line":2004},[3211,3215,3219,3224,3228],{"type":39,"tag":666,"props":3212,"children":3213},{"style":760},[3214],{"type":44,"value":3128},{"type":39,"tag":666,"props":3216,"children":3217},{"style":766},[3218],{"type":44,"value":800},{"type":39,"tag":666,"props":3220,"children":3221},{"style":679},[3222],{"type":44,"value":3223},"confirmation",{"type":39,"tag":666,"props":3225,"children":3226},{"style":766},[3227],{"type":44,"value":859},{"type":39,"tag":666,"props":3229,"children":3230},{"style":766},[3231],{"type":44,"value":3145},{"type":39,"tag":666,"props":3233,"children":3234},{"class":668,"line":2013},[3235,3239,3243,3247,3252,3256],{"type":39,"tag":666,"props":3236,"children":3237},{"style":847},[3238],{"type":44,"value":3153},{"type":39,"tag":666,"props":3240,"children":3241},{"style":1202},[3242],{"type":44,"value":854},{"type":39,"tag":666,"props":3244,"children":3245},{"style":766},[3246],{"type":44,"value":859},{"type":39,"tag":666,"props":3248,"children":3249},{"style":679},[3250],{"type":44,"value":3251},"Email confirmed. You are now logged in.",{"type":39,"tag":666,"props":3253,"children":3254},{"style":766},[3255],{"type":44,"value":859},{"type":39,"tag":666,"props":3257,"children":3258},{"style":1202},[3259],{"type":44,"value":890},{"type":39,"tag":666,"props":3261,"children":3262},{"class":668,"line":2022},[3263],{"type":39,"tag":666,"props":3264,"children":3265},{"style":760},[3266],{"type":44,"value":3207},{"type":39,"tag":666,"props":3268,"children":3269},{"class":668,"line":2446},[3270,3274,3278,3283,3287],{"type":39,"tag":666,"props":3271,"children":3272},{"style":760},[3273],{"type":44,"value":3128},{"type":39,"tag":666,"props":3275,"children":3276},{"style":766},[3277],{"type":44,"value":800},{"type":39,"tag":666,"props":3279,"children":3280},{"style":679},[3281],{"type":44,"value":3282},"recovery",{"type":39,"tag":666,"props":3284,"children":3285},{"style":766},[3286],{"type":44,"value":859},{"type":39,"tag":666,"props":3288,"children":3289},{"style":766},[3290],{"type":44,"value":3145},{"type":39,"tag":666,"props":3292,"children":3293},{"class":668,"line":2516},[3294],{"type":39,"tag":666,"props":3295,"children":3296},{"style":965},[3297],{"type":44,"value":3298},"        \u002F\u002F User is authenticated but must set a new password\n",{"type":39,"tag":666,"props":3300,"children":3301},{"class":668,"line":2524},[3302,3307,3311,3315,3319,3323],{"type":39,"tag":666,"props":3303,"children":3304},{"style":847},[3305],{"type":44,"value":3306},"        showPasswordResetForm",{"type":39,"tag":666,"props":3308,"children":3309},{"style":1202},[3310],{"type":44,"value":854},{"type":39,"tag":666,"props":3312,"children":3313},{"style":772},[3314],{"type":44,"value":3067},{"type":39,"tag":666,"props":3316,"children":3317},{"style":766},[3318],{"type":44,"value":904},{"type":39,"tag":666,"props":3320,"children":3321},{"style":772},[3322],{"type":44,"value":933},{"type":39,"tag":666,"props":3324,"children":3325},{"style":1202},[3326],{"type":44,"value":890},{"type":39,"tag":666,"props":3328,"children":3329},{"class":668,"line":2532},[3330],{"type":39,"tag":666,"props":3331,"children":3332},{"style":760},[3333],{"type":44,"value":3207},{"type":39,"tag":666,"props":3335,"children":3337},{"class":668,"line":3336},19,[3338,3342,3346,3351,3355],{"type":39,"tag":666,"props":3339,"children":3340},{"style":760},[3341],{"type":44,"value":3128},{"type":39,"tag":666,"props":3343,"children":3344},{"style":766},[3345],{"type":44,"value":800},{"type":39,"tag":666,"props":3347,"children":3348},{"style":679},[3349],{"type":44,"value":3350},"invite",{"type":39,"tag":666,"props":3352,"children":3353},{"style":766},[3354],{"type":44,"value":859},{"type":39,"tag":666,"props":3356,"children":3357},{"style":766},[3358],{"type":44,"value":3145},{"type":39,"tag":666,"props":3360,"children":3362},{"class":668,"line":3361},20,[3363],{"type":39,"tag":666,"props":3364,"children":3365},{"style":965},[3366],{"type":44,"value":3367},"        \u002F\u002F User must set a password to accept the invite\n",{"type":39,"tag":666,"props":3369,"children":3371},{"class":668,"line":3370},21,[3372,3377,3381,3385,3389,3394],{"type":39,"tag":666,"props":3373,"children":3374},{"style":847},[3375],{"type":44,"value":3376},"        showInviteAcceptForm",{"type":39,"tag":666,"props":3378,"children":3379},{"style":1202},[3380],{"type":44,"value":854},{"type":39,"tag":666,"props":3382,"children":3383},{"style":772},[3384],{"type":44,"value":3067},{"type":39,"tag":666,"props":3386,"children":3387},{"style":766},[3388],{"type":44,"value":904},{"type":39,"tag":666,"props":3390,"children":3391},{"style":772},[3392],{"type":44,"value":3393},"token",{"type":39,"tag":666,"props":3395,"children":3396},{"style":1202},[3397],{"type":44,"value":890},{"type":39,"tag":666,"props":3399,"children":3401},{"class":668,"line":3400},22,[3402],{"type":39,"tag":666,"props":3403,"children":3404},{"style":760},[3405],{"type":44,"value":3207},{"type":39,"tag":666,"props":3407,"children":3409},{"class":668,"line":3408},23,[3410,3414,3418,3423,3427],{"type":39,"tag":666,"props":3411,"children":3412},{"style":760},[3413],{"type":44,"value":3128},{"type":39,"tag":666,"props":3415,"children":3416},{"style":766},[3417],{"type":44,"value":800},{"type":39,"tag":666,"props":3419,"children":3420},{"style":679},[3421],{"type":44,"value":3422},"email_change",{"type":39,"tag":666,"props":3424,"children":3425},{"style":766},[3426],{"type":44,"value":859},{"type":39,"tag":666,"props":3428,"children":3429},{"style":766},[3430],{"type":44,"value":3145},{"type":39,"tag":666,"props":3432,"children":3433},{"class":668,"line":23},[3434,3438,3442,3446,3451,3455],{"type":39,"tag":666,"props":3435,"children":3436},{"style":847},[3437],{"type":44,"value":3153},{"type":39,"tag":666,"props":3439,"children":3440},{"style":1202},[3441],{"type":44,"value":854},{"type":39,"tag":666,"props":3443,"children":3444},{"style":766},[3445],{"type":44,"value":859},{"type":39,"tag":666,"props":3447,"children":3448},{"style":679},[3449],{"type":44,"value":3450},"Email address updated.",{"type":39,"tag":666,"props":3452,"children":3453},{"style":766},[3454],{"type":44,"value":859},{"type":39,"tag":666,"props":3456,"children":3457},{"style":1202},[3458],{"type":44,"value":890},{"type":39,"tag":666,"props":3460,"children":3462},{"class":668,"line":3461},25,[3463],{"type":39,"tag":666,"props":3464,"children":3465},{"style":760},[3466],{"type":44,"value":3207},{"type":39,"tag":666,"props":3468,"children":3470},{"class":668,"line":3469},26,[3471],{"type":39,"tag":666,"props":3472,"children":3473},{"style":766},[3474],{"type":44,"value":2010},{"type":39,"tag":666,"props":3476,"children":3478},{"class":668,"line":3477},27,[3479,3483,3487,3491,3495,3499],{"type":39,"tag":666,"props":3480,"children":3481},{"style":766},[3482],{"type":44,"value":1852},{"type":39,"tag":666,"props":3484,"children":3485},{"style":760},[3486],{"type":44,"value":1857},{"type":39,"tag":666,"props":3488,"children":3489},{"style":1202},[3490],{"type":44,"value":1125},{"type":39,"tag":666,"props":3492,"children":3493},{"style":772},[3494],{"type":44,"value":1866},{"type":39,"tag":666,"props":3496,"children":3497},{"style":1202},[3498],{"type":44,"value":1230},{"type":39,"tag":666,"props":3500,"children":3501},{"style":766},[3502],{"type":44,"value":1875},{"type":39,"tag":666,"props":3504,"children":3506},{"class":668,"line":3505},28,[3507,3511,3515,3519,3523,3527,3531,3536,3540,3544,3548,3552],{"type":39,"tag":666,"props":3508,"children":3509},{"style":760},[3510],{"type":44,"value":1883},{"type":39,"tag":666,"props":3512,"children":3513},{"style":1202},[3514],{"type":44,"value":1125},{"type":39,"tag":666,"props":3516,"children":3517},{"style":772},[3518],{"type":44,"value":1866},{"type":39,"tag":666,"props":3520,"children":3521},{"style":766},[3522],{"type":44,"value":1896},{"type":39,"tag":666,"props":3524,"children":3525},{"style":673},[3526],{"type":44,"value":1638},{"type":39,"tag":666,"props":3528,"children":3529},{"style":1202},[3530],{"type":44,"value":1230},{"type":39,"tag":666,"props":3532,"children":3533},{"style":847},[3534],{"type":44,"value":3535},"showError",{"type":39,"tag":666,"props":3537,"children":3538},{"style":1202},[3539],{"type":44,"value":854},{"type":39,"tag":666,"props":3541,"children":3542},{"style":772},[3543],{"type":44,"value":1866},{"type":39,"tag":666,"props":3545,"children":3546},{"style":766},[3547],{"type":44,"value":904},{"type":39,"tag":666,"props":3549,"children":3550},{"style":772},[3551],{"type":44,"value":1997},{"type":39,"tag":666,"props":3553,"children":3554},{"style":1202},[3555],{"type":44,"value":890},{"type":39,"tag":666,"props":3557,"children":3559},{"class":668,"line":3558},29,[3560],{"type":39,"tag":666,"props":3561,"children":3562},{"style":766},[3563],{"type":44,"value":2019},{"type":39,"tag":666,"props":3565,"children":3567},{"class":668,"line":3566},30,[3568],{"type":39,"tag":666,"props":3569,"children":3570},{"style":766},[3571],{"type":44,"value":1389},{"type":39,"tag":238,"props":3573,"children":3575},{"id":3574},"auth-state",[3576],{"type":44,"value":3577},"Auth State",{"type":39,"tag":500,"props":3579,"children":3581},{"className":748,"code":3580,"language":750,"meta":508,"style":508},"import { getUser, onAuthChange, AUTH_EVENTS } from '@netlify\u002Fidentity'\n\n\u002F\u002F Check current user (never throws — returns null if not authenticated)\nconst user = await getUser()\n\n\u002F\u002F Subscribe to auth state changes (returns unsubscribe function)\nconst unsubscribe = onAuthChange((event, user) => {\n  switch (event) {\n    case AUTH_EVENTS.LOGIN:\n      console.log('Logged in:', user?.email)\n      break\n    case AUTH_EVENTS.LOGOUT:\n      console.log('Logged out')\n      break\n    case AUTH_EVENTS.TOKEN_REFRESH:\n      break\n    case AUTH_EVENTS.USER_UPDATED:\n      console.log('Profile updated:', user?.email)\n      break\n    case AUTH_EVENTS.RECOVERY:\n      console.log('Password recovery initiated')\n      break\n  }\n})\n",[3582],{"type":39,"tag":73,"props":3583,"children":3584},{"__ignoreMap":508},[3585,3638,3645,3653,3680,3687,3695,3748,3772,3797,3850,3858,3882,3918,3925,3949,3956,3980,4032,4039,4063,4099,4106,4113],{"type":39,"tag":666,"props":3586,"children":3587},{"class":668,"line":669},[3588,3592,3596,3600,3604,3609,3613,3618,3622,3626,3630,3634],{"type":39,"tag":666,"props":3589,"children":3590},{"style":760},[3591],{"type":44,"value":763},{"type":39,"tag":666,"props":3593,"children":3594},{"style":766},[3595],{"type":44,"value":769},{"type":39,"tag":666,"props":3597,"children":3598},{"style":772},[3599],{"type":44,"value":785},{"type":39,"tag":666,"props":3601,"children":3602},{"style":766},[3603],{"type":44,"value":780},{"type":39,"tag":666,"props":3605,"children":3606},{"style":772},[3607],{"type":44,"value":3608}," onAuthChange",{"type":39,"tag":666,"props":3610,"children":3611},{"style":766},[3612],{"type":44,"value":780},{"type":39,"tag":666,"props":3614,"children":3615},{"style":772},[3616],{"type":44,"value":3617}," AUTH_EVENTS",{"type":39,"tag":666,"props":3619,"children":3620},{"style":766},[3621],{"type":44,"value":790},{"type":39,"tag":666,"props":3623,"children":3624},{"style":760},[3625],{"type":44,"value":795},{"type":39,"tag":666,"props":3627,"children":3628},{"style":766},[3629],{"type":44,"value":800},{"type":39,"tag":666,"props":3631,"children":3632},{"style":679},[3633],{"type":44,"value":78},{"type":39,"tag":666,"props":3635,"children":3636},{"style":766},[3637],{"type":44,"value":809},{"type":39,"tag":666,"props":3639,"children":3640},{"class":668,"line":812},[3641],{"type":39,"tag":666,"props":3642,"children":3643},{"emptyLinePlaceholder":816},[3644],{"type":44,"value":819},{"type":39,"tag":666,"props":3646,"children":3647},{"class":668,"line":822},[3648],{"type":39,"tag":666,"props":3649,"children":3650},{"style":965},[3651],{"type":44,"value":3652},"\u002F\u002F Check current user (never throws — returns null if not authenticated)\n",{"type":39,"tag":666,"props":3654,"children":3655},{"class":668,"line":893},[3656,3660,3664,3668,3672,3676],{"type":39,"tag":666,"props":3657,"children":3658},{"style":826},[3659],{"type":44,"value":829},{"type":39,"tag":666,"props":3661,"children":3662},{"style":772},[3663],{"type":44,"value":834},{"type":39,"tag":666,"props":3665,"children":3666},{"style":766},[3667],{"type":44,"value":839},{"type":39,"tag":666,"props":3669,"children":3670},{"style":760},[3671],{"type":44,"value":844},{"type":39,"tag":666,"props":3673,"children":3674},{"style":847},[3675],{"type":44,"value":785},{"type":39,"tag":666,"props":3677,"children":3678},{"style":772},[3679],{"type":44,"value":998},{"type":39,"tag":666,"props":3681,"children":3682},{"class":668,"line":27},[3683],{"type":39,"tag":666,"props":3684,"children":3685},{"emptyLinePlaceholder":816},[3686],{"type":44,"value":819},{"type":39,"tag":666,"props":3688,"children":3689},{"class":668,"line":961},[3690],{"type":39,"tag":666,"props":3691,"children":3692},{"style":965},[3693],{"type":44,"value":3694},"\u002F\u002F Subscribe to auth state changes (returns unsubscribe function)\n",{"type":39,"tag":666,"props":3696,"children":3697},{"class":668,"line":971},[3698,3702,3707,3711,3715,3719,3723,3728,3732,3736,3740,3744],{"type":39,"tag":666,"props":3699,"children":3700},{"style":826},[3701],{"type":44,"value":829},{"type":39,"tag":666,"props":3703,"children":3704},{"style":772},[3705],{"type":44,"value":3706}," unsubscribe ",{"type":39,"tag":666,"props":3708,"children":3709},{"style":766},[3710],{"type":44,"value":839},{"type":39,"tag":666,"props":3712,"children":3713},{"style":847},[3714],{"type":44,"value":3608},{"type":39,"tag":666,"props":3716,"children":3717},{"style":772},[3718],{"type":44,"value":854},{"type":39,"tag":666,"props":3720,"children":3721},{"style":766},[3722],{"type":44,"value":854},{"type":39,"tag":666,"props":3724,"children":3725},{"style":1128},[3726],{"type":44,"value":3727},"event",{"type":39,"tag":666,"props":3729,"children":3730},{"style":766},[3731],{"type":44,"value":780},{"type":39,"tag":666,"props":3733,"children":3734},{"style":1128},[3735],{"type":44,"value":1186},{"type":39,"tag":666,"props":3737,"children":3738},{"style":766},[3739],{"type":44,"value":1163},{"type":39,"tag":666,"props":3741,"children":3742},{"style":826},[3743],{"type":44,"value":1168},{"type":39,"tag":666,"props":3745,"children":3746},{"style":766},[3747],{"type":44,"value":1173},{"type":39,"tag":666,"props":3749,"children":3750},{"class":668,"line":1296},[3751,3756,3760,3764,3768],{"type":39,"tag":666,"props":3752,"children":3753},{"style":760},[3754],{"type":44,"value":3755},"  switch",{"type":39,"tag":666,"props":3757,"children":3758},{"style":1202},[3759],{"type":44,"value":1125},{"type":39,"tag":666,"props":3761,"children":3762},{"style":772},[3763],{"type":44,"value":3727},{"type":39,"tag":666,"props":3765,"children":3766},{"style":1202},[3767],{"type":44,"value":1230},{"type":39,"tag":666,"props":3769,"children":3770},{"style":766},[3771],{"type":44,"value":1875},{"type":39,"tag":666,"props":3773,"children":3774},{"class":668,"line":1383},[3775,3780,3784,3788,3793],{"type":39,"tag":666,"props":3776,"children":3777},{"style":760},[3778],{"type":44,"value":3779},"    case",{"type":39,"tag":666,"props":3781,"children":3782},{"style":772},[3783],{"type":44,"value":3617},{"type":39,"tag":666,"props":3785,"children":3786},{"style":766},[3787],{"type":44,"value":904},{"type":39,"tag":666,"props":3789,"children":3790},{"style":772},[3791],{"type":44,"value":3792},"LOGIN",{"type":39,"tag":666,"props":3794,"children":3795},{"style":766},[3796],{"type":44,"value":3145},{"type":39,"tag":666,"props":3798,"children":3799},{"class":668,"line":1580},[3800,3805,3809,3813,3817,3821,3826,3830,3834,3838,3842,3846],{"type":39,"tag":666,"props":3801,"children":3802},{"style":772},[3803],{"type":44,"value":3804},"      console",{"type":39,"tag":666,"props":3806,"children":3807},{"style":766},[3808],{"type":44,"value":904},{"type":39,"tag":666,"props":3810,"children":3811},{"style":847},[3812],{"type":44,"value":909},{"type":39,"tag":666,"props":3814,"children":3815},{"style":1202},[3816],{"type":44,"value":854},{"type":39,"tag":666,"props":3818,"children":3819},{"style":766},[3820],{"type":44,"value":859},{"type":39,"tag":666,"props":3822,"children":3823},{"style":679},[3824],{"type":44,"value":3825},"Logged in:",{"type":39,"tag":666,"props":3827,"children":3828},{"style":766},[3829],{"type":44,"value":859},{"type":39,"tag":666,"props":3831,"children":3832},{"style":766},[3833],{"type":44,"value":780},{"type":39,"tag":666,"props":3835,"children":3836},{"style":772},[3837],{"type":44,"value":1186},{"type":39,"tag":666,"props":3839,"children":3840},{"style":766},[3841],{"type":44,"value":3187},{"type":39,"tag":666,"props":3843,"children":3844},{"style":772},[3845],{"type":44,"value":1372},{"type":39,"tag":666,"props":3847,"children":3848},{"style":1202},[3849],{"type":44,"value":890},{"type":39,"tag":666,"props":3851,"children":3852},{"class":668,"line":1927},[3853],{"type":39,"tag":666,"props":3854,"children":3855},{"style":760},[3856],{"type":44,"value":3857},"      break\n",{"type":39,"tag":666,"props":3859,"children":3860},{"class":668,"line":2004},[3861,3865,3869,3873,3878],{"type":39,"tag":666,"props":3862,"children":3863},{"style":760},[3864],{"type":44,"value":3779},{"type":39,"tag":666,"props":3866,"children":3867},{"style":772},[3868],{"type":44,"value":3617},{"type":39,"tag":666,"props":3870,"children":3871},{"style":766},[3872],{"type":44,"value":904},{"type":39,"tag":666,"props":3874,"children":3875},{"style":772},[3876],{"type":44,"value":3877},"LOGOUT",{"type":39,"tag":666,"props":3879,"children":3880},{"style":766},[3881],{"type":44,"value":3145},{"type":39,"tag":666,"props":3883,"children":3884},{"class":668,"line":2013},[3885,3889,3893,3897,3901,3905,3910,3914],{"type":39,"tag":666,"props":3886,"children":3887},{"style":772},[3888],{"type":44,"value":3804},{"type":39,"tag":666,"props":3890,"children":3891},{"style":766},[3892],{"type":44,"value":904},{"type":39,"tag":666,"props":3894,"children":3895},{"style":847},[3896],{"type":44,"value":909},{"type":39,"tag":666,"props":3898,"children":3899},{"style":1202},[3900],{"type":44,"value":854},{"type":39,"tag":666,"props":3902,"children":3903},{"style":766},[3904],{"type":44,"value":859},{"type":39,"tag":666,"props":3906,"children":3907},{"style":679},[3908],{"type":44,"value":3909},"Logged out",{"type":39,"tag":666,"props":3911,"children":3912},{"style":766},[3913],{"type":44,"value":859},{"type":39,"tag":666,"props":3915,"children":3916},{"style":1202},[3917],{"type":44,"value":890},{"type":39,"tag":666,"props":3919,"children":3920},{"class":668,"line":2022},[3921],{"type":39,"tag":666,"props":3922,"children":3923},{"style":760},[3924],{"type":44,"value":3857},{"type":39,"tag":666,"props":3926,"children":3927},{"class":668,"line":2446},[3928,3932,3936,3940,3945],{"type":39,"tag":666,"props":3929,"children":3930},{"style":760},[3931],{"type":44,"value":3779},{"type":39,"tag":666,"props":3933,"children":3934},{"style":772},[3935],{"type":44,"value":3617},{"type":39,"tag":666,"props":3937,"children":3938},{"style":766},[3939],{"type":44,"value":904},{"type":39,"tag":666,"props":3941,"children":3942},{"style":772},[3943],{"type":44,"value":3944},"TOKEN_REFRESH",{"type":39,"tag":666,"props":3946,"children":3947},{"style":766},[3948],{"type":44,"value":3145},{"type":39,"tag":666,"props":3950,"children":3951},{"class":668,"line":2516},[3952],{"type":39,"tag":666,"props":3953,"children":3954},{"style":760},[3955],{"type":44,"value":3857},{"type":39,"tag":666,"props":3957,"children":3958},{"class":668,"line":2524},[3959,3963,3967,3971,3976],{"type":39,"tag":666,"props":3960,"children":3961},{"style":760},[3962],{"type":44,"value":3779},{"type":39,"tag":666,"props":3964,"children":3965},{"style":772},[3966],{"type":44,"value":3617},{"type":39,"tag":666,"props":3968,"children":3969},{"style":766},[3970],{"type":44,"value":904},{"type":39,"tag":666,"props":3972,"children":3973},{"style":772},[3974],{"type":44,"value":3975},"USER_UPDATED",{"type":39,"tag":666,"props":3977,"children":3978},{"style":766},[3979],{"type":44,"value":3145},{"type":39,"tag":666,"props":3981,"children":3982},{"class":668,"line":2532},[3983,3987,3991,3995,3999,4003,4008,4012,4016,4020,4024,4028],{"type":39,"tag":666,"props":3984,"children":3985},{"style":772},[3986],{"type":44,"value":3804},{"type":39,"tag":666,"props":3988,"children":3989},{"style":766},[3990],{"type":44,"value":904},{"type":39,"tag":666,"props":3992,"children":3993},{"style":847},[3994],{"type":44,"value":909},{"type":39,"tag":666,"props":3996,"children":3997},{"style":1202},[3998],{"type":44,"value":854},{"type":39,"tag":666,"props":4000,"children":4001},{"style":766},[4002],{"type":44,"value":859},{"type":39,"tag":666,"props":4004,"children":4005},{"style":679},[4006],{"type":44,"value":4007},"Profile updated:",{"type":39,"tag":666,"props":4009,"children":4010},{"style":766},[4011],{"type":44,"value":859},{"type":39,"tag":666,"props":4013,"children":4014},{"style":766},[4015],{"type":44,"value":780},{"type":39,"tag":666,"props":4017,"children":4018},{"style":772},[4019],{"type":44,"value":1186},{"type":39,"tag":666,"props":4021,"children":4022},{"style":766},[4023],{"type":44,"value":3187},{"type":39,"tag":666,"props":4025,"children":4026},{"style":772},[4027],{"type":44,"value":1372},{"type":39,"tag":666,"props":4029,"children":4030},{"style":1202},[4031],{"type":44,"value":890},{"type":39,"tag":666,"props":4033,"children":4034},{"class":668,"line":3336},[4035],{"type":39,"tag":666,"props":4036,"children":4037},{"style":760},[4038],{"type":44,"value":3857},{"type":39,"tag":666,"props":4040,"children":4041},{"class":668,"line":3361},[4042,4046,4050,4054,4059],{"type":39,"tag":666,"props":4043,"children":4044},{"style":760},[4045],{"type":44,"value":3779},{"type":39,"tag":666,"props":4047,"children":4048},{"style":772},[4049],{"type":44,"value":3617},{"type":39,"tag":666,"props":4051,"children":4052},{"style":766},[4053],{"type":44,"value":904},{"type":39,"tag":666,"props":4055,"children":4056},{"style":772},[4057],{"type":44,"value":4058},"RECOVERY",{"type":39,"tag":666,"props":4060,"children":4061},{"style":766},[4062],{"type":44,"value":3145},{"type":39,"tag":666,"props":4064,"children":4065},{"class":668,"line":3370},[4066,4070,4074,4078,4082,4086,4091,4095],{"type":39,"tag":666,"props":4067,"children":4068},{"style":772},[4069],{"type":44,"value":3804},{"type":39,"tag":666,"props":4071,"children":4072},{"style":766},[4073],{"type":44,"value":904},{"type":39,"tag":666,"props":4075,"children":4076},{"style":847},[4077],{"type":44,"value":909},{"type":39,"tag":666,"props":4079,"children":4080},{"style":1202},[4081],{"type":44,"value":854},{"type":39,"tag":666,"props":4083,"children":4084},{"style":766},[4085],{"type":44,"value":859},{"type":39,"tag":666,"props":4087,"children":4088},{"style":679},[4089],{"type":44,"value":4090},"Password recovery initiated",{"type":39,"tag":666,"props":4092,"children":4093},{"style":766},[4094],{"type":44,"value":859},{"type":39,"tag":666,"props":4096,"children":4097},{"style":1202},[4098],{"type":44,"value":890},{"type":39,"tag":666,"props":4100,"children":4101},{"class":668,"line":3400},[4102],{"type":39,"tag":666,"props":4103,"children":4104},{"style":760},[4105],{"type":44,"value":3857},{"type":39,"tag":666,"props":4107,"children":4108},{"class":668,"line":3408},[4109],{"type":39,"tag":666,"props":4110,"children":4111},{"style":766},[4112],{"type":44,"value":2019},{"type":39,"tag":666,"props":4114,"children":4115},{"class":668,"line":23},[4116,4120],{"type":39,"tag":666,"props":4117,"children":4118},{"style":766},[4119],{"type":44,"value":1586},{"type":39,"tag":666,"props":4121,"children":4122},{"style":772},[4123],{"type":44,"value":890},{"type":39,"tag":238,"props":4125,"children":4127},{"id":4126},"settings-driven-ui",[4128],{"type":44,"value":4129},"Settings-Driven UI",{"type":39,"tag":47,"props":4131,"children":4132},{},[4133,4135,4140,4142,4148,4150,4155,4157,4163,4165,4170],{"type":44,"value":4134},"You cannot see a project's live Identity configuration while you are writing the code — there is no API, MCP tool, or CLI command that reports whether Identity is enabled or which providers are on; that state lives in the dashboard. So ",{"type":39,"tag":67,"props":4136,"children":4137},{},[4138],{"type":44,"value":4139},"don't hard-code which providers exist.",{"type":44,"value":4141}," Call ",{"type":39,"tag":73,"props":4143,"children":4145},{"className":4144},[],[4146],{"type":44,"value":4147},"getSettings()",{"type":44,"value":4149}," at startup and render the signup form and OAuth buttons from what it returns, so the UI matches whatever the user actually enabled — and a provider you assumed was on but isn't won't render a dead button. (",{"type":39,"tag":73,"props":4151,"children":4153},{"className":4152},[],[4154],{"type":44,"value":4147},{"type":44,"value":4156}," hits ",{"type":39,"tag":73,"props":4158,"children":4160},{"className":4159},[],[4161],{"type":44,"value":4162},"\u002F.netlify\u002Fidentity\u002Fsettings",{"type":44,"value":4164}," and works against any origin serving the page, including localhost under ",{"type":39,"tag":73,"props":4166,"children":4168},{"className":4167},[],[4169],{"type":44,"value":724},{"type":44,"value":4171},", which proxies to the live service — but it can't tell you anything pre-run, so ask the user what's configured while you're still scaffolding.)",{"type":39,"tag":500,"props":4173,"children":4175},{"className":748,"code":4174,"language":750,"meta":508,"style":508},"import { getSettings } from '@netlify\u002Fidentity'\n\nconst settings = await getSettings()\n\u002F\u002F settings.autoconfirm — boolean\n\u002F\u002F settings.disableSignup — boolean\n\u002F\u002F settings.providers — Record\u003CAuthProvider, boolean>\n\nif (!settings.disableSignup) showSignupForm()\n\nfor (const [provider, enabled] of Object.entries(settings.providers)) {\n  if (enabled) showOAuthButton(provider)\n}\n",[4176],{"type":39,"tag":73,"props":4177,"children":4178},{"__ignoreMap":508},[4179,4215,4222,4250,4258,4266,4274,4281,4320,4327,4403,4440],{"type":39,"tag":666,"props":4180,"children":4181},{"class":668,"line":669},[4182,4186,4190,4195,4199,4203,4207,4211],{"type":39,"tag":666,"props":4183,"children":4184},{"style":760},[4185],{"type":44,"value":763},{"type":39,"tag":666,"props":4187,"children":4188},{"style":766},[4189],{"type":44,"value":769},{"type":39,"tag":666,"props":4191,"children":4192},{"style":772},[4193],{"type":44,"value":4194}," getSettings",{"type":39,"tag":666,"props":4196,"children":4197},{"style":766},[4198],{"type":44,"value":790},{"type":39,"tag":666,"props":4200,"children":4201},{"style":760},[4202],{"type":44,"value":795},{"type":39,"tag":666,"props":4204,"children":4205},{"style":766},[4206],{"type":44,"value":800},{"type":39,"tag":666,"props":4208,"children":4209},{"style":679},[4210],{"type":44,"value":78},{"type":39,"tag":666,"props":4212,"children":4213},{"style":766},[4214],{"type":44,"value":809},{"type":39,"tag":666,"props":4216,"children":4217},{"class":668,"line":812},[4218],{"type":39,"tag":666,"props":4219,"children":4220},{"emptyLinePlaceholder":816},[4221],{"type":44,"value":819},{"type":39,"tag":666,"props":4223,"children":4224},{"class":668,"line":822},[4225,4229,4234,4238,4242,4246],{"type":39,"tag":666,"props":4226,"children":4227},{"style":826},[4228],{"type":44,"value":829},{"type":39,"tag":666,"props":4230,"children":4231},{"style":772},[4232],{"type":44,"value":4233}," settings ",{"type":39,"tag":666,"props":4235,"children":4236},{"style":766},[4237],{"type":44,"value":839},{"type":39,"tag":666,"props":4239,"children":4240},{"style":760},[4241],{"type":44,"value":844},{"type":39,"tag":666,"props":4243,"children":4244},{"style":847},[4245],{"type":44,"value":4194},{"type":39,"tag":666,"props":4247,"children":4248},{"style":772},[4249],{"type":44,"value":998},{"type":39,"tag":666,"props":4251,"children":4252},{"class":668,"line":893},[4253],{"type":39,"tag":666,"props":4254,"children":4255},{"style":965},[4256],{"type":44,"value":4257},"\u002F\u002F settings.autoconfirm — boolean\n",{"type":39,"tag":666,"props":4259,"children":4260},{"class":668,"line":27},[4261],{"type":39,"tag":666,"props":4262,"children":4263},{"style":965},[4264],{"type":44,"value":4265},"\u002F\u002F settings.disableSignup — boolean\n",{"type":39,"tag":666,"props":4267,"children":4268},{"class":668,"line":961},[4269],{"type":39,"tag":666,"props":4270,"children":4271},{"style":965},[4272],{"type":44,"value":4273},"\u002F\u002F settings.providers — Record\u003CAuthProvider, boolean>\n",{"type":39,"tag":666,"props":4275,"children":4276},{"class":668,"line":971},[4277],{"type":39,"tag":666,"props":4278,"children":4279},{"emptyLinePlaceholder":816},[4280],{"type":44,"value":819},{"type":39,"tag":666,"props":4282,"children":4283},{"class":668,"line":1296},[4284,4289,4293,4297,4302,4306,4311,4316],{"type":39,"tag":666,"props":4285,"children":4286},{"style":760},[4287],{"type":44,"value":4288},"if",{"type":39,"tag":666,"props":4290,"children":4291},{"style":772},[4292],{"type":44,"value":1125},{"type":39,"tag":666,"props":4294,"children":4295},{"style":766},[4296],{"type":44,"value":1221},{"type":39,"tag":666,"props":4298,"children":4299},{"style":772},[4300],{"type":44,"value":4301},"settings",{"type":39,"tag":666,"props":4303,"children":4304},{"style":766},[4305],{"type":44,"value":904},{"type":39,"tag":666,"props":4307,"children":4308},{"style":772},[4309],{"type":44,"value":4310},"disableSignup) ",{"type":39,"tag":666,"props":4312,"children":4313},{"style":847},[4314],{"type":44,"value":4315},"showSignupForm",{"type":39,"tag":666,"props":4317,"children":4318},{"style":772},[4319],{"type":44,"value":998},{"type":39,"tag":666,"props":4321,"children":4322},{"class":668,"line":1383},[4323],{"type":39,"tag":666,"props":4324,"children":4325},{"emptyLinePlaceholder":816},[4326],{"type":44,"value":819},{"type":39,"tag":666,"props":4328,"children":4329},{"class":668,"line":1580},[4330,4335,4339,4343,4348,4352,4356,4361,4366,4371,4376,4380,4385,4390,4394,4399],{"type":39,"tag":666,"props":4331,"children":4332},{"style":760},[4333],{"type":44,"value":4334},"for",{"type":39,"tag":666,"props":4336,"children":4337},{"style":772},[4338],{"type":44,"value":1125},{"type":39,"tag":666,"props":4340,"children":4341},{"style":826},[4342],{"type":44,"value":829},{"type":39,"tag":666,"props":4344,"children":4345},{"style":766},[4346],{"type":44,"value":4347}," [",{"type":39,"tag":666,"props":4349,"children":4350},{"style":772},[4351],{"type":44,"value":2773},{"type":39,"tag":666,"props":4353,"children":4354},{"style":766},[4355],{"type":44,"value":780},{"type":39,"tag":666,"props":4357,"children":4358},{"style":772},[4359],{"type":44,"value":4360}," enabled",{"type":39,"tag":666,"props":4362,"children":4363},{"style":766},[4364],{"type":44,"value":4365},"]",{"type":39,"tag":666,"props":4367,"children":4368},{"style":766},[4369],{"type":44,"value":4370}," of",{"type":39,"tag":666,"props":4372,"children":4373},{"style":772},[4374],{"type":44,"value":4375}," Object",{"type":39,"tag":666,"props":4377,"children":4378},{"style":766},[4379],{"type":44,"value":904},{"type":39,"tag":666,"props":4381,"children":4382},{"style":847},[4383],{"type":44,"value":4384},"entries",{"type":39,"tag":666,"props":4386,"children":4387},{"style":772},[4388],{"type":44,"value":4389},"(settings",{"type":39,"tag":666,"props":4391,"children":4392},{"style":766},[4393],{"type":44,"value":904},{"type":39,"tag":666,"props":4395,"children":4396},{"style":772},[4397],{"type":44,"value":4398},"providers)) ",{"type":39,"tag":666,"props":4400,"children":4401},{"style":766},[4402],{"type":44,"value":1875},{"type":39,"tag":666,"props":4404,"children":4405},{"class":668,"line":1927},[4406,4410,4414,4419,4423,4428,4432,4436],{"type":39,"tag":666,"props":4407,"children":4408},{"style":760},[4409],{"type":44,"value":1212},{"type":39,"tag":666,"props":4411,"children":4412},{"style":1202},[4413],{"type":44,"value":1125},{"type":39,"tag":666,"props":4415,"children":4416},{"style":772},[4417],{"type":44,"value":4418},"enabled",{"type":39,"tag":666,"props":4420,"children":4421},{"style":1202},[4422],{"type":44,"value":1230},{"type":39,"tag":666,"props":4424,"children":4425},{"style":847},[4426],{"type":44,"value":4427},"showOAuthButton",{"type":39,"tag":666,"props":4429,"children":4430},{"style":1202},[4431],{"type":44,"value":854},{"type":39,"tag":666,"props":4433,"children":4434},{"style":772},[4435],{"type":44,"value":2773},{"type":39,"tag":666,"props":4437,"children":4438},{"style":1202},[4439],{"type":44,"value":890},{"type":39,"tag":666,"props":4441,"children":4442},{"class":668,"line":2004},[4443],{"type":39,"tag":666,"props":4444,"children":4445},{"style":766},[4446],{"type":44,"value":1389},{"type":39,"tag":107,"props":4448,"children":4450},{"id":4449},"minimal-react-example",[4451],{"type":44,"value":4452},"Minimal React Example",{"type":39,"tag":500,"props":4454,"children":4458},{"className":4455,"code":4456,"language":4457,"meta":508,"style":508},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { useEffect, useState } from 'react'\nimport {\n  getUser,\n  handleAuthCallback,\n  login,\n  logout,\n  oauthLogin,\n  onAuthChange,\n} from '@netlify\u002Fidentity'\n\nfunction App() {\n  const [user, setUser] = useState(null)\n  const [loading, setLoading] = useState(true)\n\n  useEffect(() => {\n    ;(async () => {\n      await handleAuthCallback()\n      setUser(await getUser())\n      setLoading(false)\n    })()\n    return onAuthChange((_event, currentUser) => setUser(currentUser))\n  }, [])\n\n  const handleLogin = async (email, password) => {\n    const currentUser = await login(email, password)\n    setUser(currentUser)\n  }\n\n  const handleGoogleLogin = () => oauthLogin('google')\n\n  const handleSignOut = async () => {\n    await logout()\n    setUser(null)\n  }\n\n  if (loading) return \u003Cp>Loading...\u003C\u002Fp>\n  \u002F\u002F Render login form or user details based on `user` state\n}\n","tsx",[4459],{"type":39,"tag":73,"props":4460,"children":4461},{"__ignoreMap":508},[4462,4508,4519,4530,4541,4552,4563,4574,4585,4608,4615,4635,4684,4735,4742,4766,4795,4811,4836,4857,4869,4929,4942,4949,4996,5039,5059,5066,5073,5121,5128,5161,5178,5198,5206,5214,5271,5280],{"type":39,"tag":666,"props":4463,"children":4464},{"class":668,"line":669},[4465,4469,4473,4478,4482,4487,4491,4495,4499,4504],{"type":39,"tag":666,"props":4466,"children":4467},{"style":760},[4468],{"type":44,"value":763},{"type":39,"tag":666,"props":4470,"children":4471},{"style":766},[4472],{"type":44,"value":769},{"type":39,"tag":666,"props":4474,"children":4475},{"style":772},[4476],{"type":44,"value":4477}," useEffect",{"type":39,"tag":666,"props":4479,"children":4480},{"style":766},[4481],{"type":44,"value":780},{"type":39,"tag":666,"props":4483,"children":4484},{"style":772},[4485],{"type":44,"value":4486}," useState",{"type":39,"tag":666,"props":4488,"children":4489},{"style":766},[4490],{"type":44,"value":790},{"type":39,"tag":666,"props":4492,"children":4493},{"style":760},[4494],{"type":44,"value":795},{"type":39,"tag":666,"props":4496,"children":4497},{"style":766},[4498],{"type":44,"value":800},{"type":39,"tag":666,"props":4500,"children":4501},{"style":679},[4502],{"type":44,"value":4503},"react",{"type":39,"tag":666,"props":4505,"children":4506},{"style":766},[4507],{"type":44,"value":809},{"type":39,"tag":666,"props":4509,"children":4510},{"class":668,"line":812},[4511,4515],{"type":39,"tag":666,"props":4512,"children":4513},{"style":760},[4514],{"type":44,"value":763},{"type":39,"tag":666,"props":4516,"children":4517},{"style":766},[4518],{"type":44,"value":1173},{"type":39,"tag":666,"props":4520,"children":4521},{"class":668,"line":822},[4522,4526],{"type":39,"tag":666,"props":4523,"children":4524},{"style":772},[4525],{"type":44,"value":1488},{"type":39,"tag":666,"props":4527,"children":4528},{"style":766},[4529],{"type":44,"value":1493},{"type":39,"tag":666,"props":4531,"children":4532},{"class":668,"line":893},[4533,4537],{"type":39,"tag":666,"props":4534,"children":4535},{"style":772},[4536],{"type":44,"value":1501},{"type":39,"tag":666,"props":4538,"children":4539},{"style":766},[4540],{"type":44,"value":1493},{"type":39,"tag":666,"props":4542,"children":4543},{"class":668,"line":27},[4544,4548],{"type":39,"tag":666,"props":4545,"children":4546},{"style":772},[4547],{"type":44,"value":1513},{"type":39,"tag":666,"props":4549,"children":4550},{"style":766},[4551],{"type":44,"value":1493},{"type":39,"tag":666,"props":4553,"children":4554},{"class":668,"line":961},[4555,4559],{"type":39,"tag":666,"props":4556,"children":4557},{"style":772},[4558],{"type":44,"value":1525},{"type":39,"tag":666,"props":4560,"children":4561},{"style":766},[4562],{"type":44,"value":1493},{"type":39,"tag":666,"props":4564,"children":4565},{"class":668,"line":971},[4566,4570],{"type":39,"tag":666,"props":4567,"children":4568},{"style":772},[4569],{"type":44,"value":1549},{"type":39,"tag":666,"props":4571,"children":4572},{"style":766},[4573],{"type":44,"value":1493},{"type":39,"tag":666,"props":4575,"children":4576},{"class":668,"line":1296},[4577,4581],{"type":39,"tag":666,"props":4578,"children":4579},{"style":772},[4580],{"type":44,"value":1561},{"type":39,"tag":666,"props":4582,"children":4583},{"style":766},[4584],{"type":44,"value":1493},{"type":39,"tag":666,"props":4586,"children":4587},{"class":668,"line":1383},[4588,4592,4596,4600,4604],{"type":39,"tag":666,"props":4589,"children":4590},{"style":766},[4591],{"type":44,"value":1586},{"type":39,"tag":666,"props":4593,"children":4594},{"style":760},[4595],{"type":44,"value":795},{"type":39,"tag":666,"props":4597,"children":4598},{"style":766},[4599],{"type":44,"value":800},{"type":39,"tag":666,"props":4601,"children":4602},{"style":679},[4603],{"type":44,"value":78},{"type":39,"tag":666,"props":4605,"children":4606},{"style":766},[4607],{"type":44,"value":809},{"type":39,"tag":666,"props":4609,"children":4610},{"class":668,"line":1580},[4611],{"type":39,"tag":666,"props":4612,"children":4613},{"emptyLinePlaceholder":816},[4614],{"type":44,"value":819},{"type":39,"tag":666,"props":4616,"children":4617},{"class":668,"line":1927},[4618,4622,4627,4631],{"type":39,"tag":666,"props":4619,"children":4620},{"style":826},[4621],{"type":44,"value":2759},{"type":39,"tag":666,"props":4623,"children":4624},{"style":847},[4625],{"type":44,"value":4626}," App",{"type":39,"tag":666,"props":4628,"children":4629},{"style":766},[4630],{"type":44,"value":3004},{"type":39,"tag":666,"props":4632,"children":4633},{"style":766},[4634],{"type":44,"value":1173},{"type":39,"tag":666,"props":4636,"children":4637},{"class":668,"line":2004},[4638,4642,4646,4650,4654,4659,4663,4667,4671,4675,4680],{"type":39,"tag":666,"props":4639,"children":4640},{"style":826},[4641],{"type":44,"value":1181},{"type":39,"tag":666,"props":4643,"children":4644},{"style":766},[4645],{"type":44,"value":4347},{"type":39,"tag":666,"props":4647,"children":4648},{"style":772},[4649],{"type":44,"value":933},{"type":39,"tag":666,"props":4651,"children":4652},{"style":766},[4653],{"type":44,"value":780},{"type":39,"tag":666,"props":4655,"children":4656},{"style":772},[4657],{"type":44,"value":4658}," setUser",{"type":39,"tag":666,"props":4660,"children":4661},{"style":766},[4662],{"type":44,"value":4365},{"type":39,"tag":666,"props":4664,"children":4665},{"style":766},[4666],{"type":44,"value":1191},{"type":39,"tag":666,"props":4668,"children":4669},{"style":847},[4670],{"type":44,"value":4486},{"type":39,"tag":666,"props":4672,"children":4673},{"style":1202},[4674],{"type":44,"value":854},{"type":39,"tag":666,"props":4676,"children":4677},{"style":766},[4678],{"type":44,"value":4679},"null",{"type":39,"tag":666,"props":4681,"children":4682},{"style":1202},[4683],{"type":44,"value":890},{"type":39,"tag":666,"props":4685,"children":4686},{"class":668,"line":2013},[4687,4691,4695,4700,4704,4709,4713,4717,4721,4725,4731],{"type":39,"tag":666,"props":4688,"children":4689},{"style":826},[4690],{"type":44,"value":1181},{"type":39,"tag":666,"props":4692,"children":4693},{"style":766},[4694],{"type":44,"value":4347},{"type":39,"tag":666,"props":4696,"children":4697},{"style":772},[4698],{"type":44,"value":4699},"loading",{"type":39,"tag":666,"props":4701,"children":4702},{"style":766},[4703],{"type":44,"value":780},{"type":39,"tag":666,"props":4705,"children":4706},{"style":772},[4707],{"type":44,"value":4708}," setLoading",{"type":39,"tag":666,"props":4710,"children":4711},{"style":766},[4712],{"type":44,"value":4365},{"type":39,"tag":666,"props":4714,"children":4715},{"style":766},[4716],{"type":44,"value":1191},{"type":39,"tag":666,"props":4718,"children":4719},{"style":847},[4720],{"type":44,"value":4486},{"type":39,"tag":666,"props":4722,"children":4723},{"style":1202},[4724],{"type":44,"value":854},{"type":39,"tag":666,"props":4726,"children":4728},{"style":4727},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4729],{"type":44,"value":4730},"true",{"type":39,"tag":666,"props":4732,"children":4733},{"style":1202},[4734],{"type":44,"value":890},{"type":39,"tag":666,"props":4736,"children":4737},{"class":668,"line":2022},[4738],{"type":39,"tag":666,"props":4739,"children":4740},{"emptyLinePlaceholder":816},[4741],{"type":44,"value":819},{"type":39,"tag":666,"props":4743,"children":4744},{"class":668,"line":2446},[4745,4750,4754,4758,4762],{"type":39,"tag":666,"props":4746,"children":4747},{"style":847},[4748],{"type":44,"value":4749},"  useEffect",{"type":39,"tag":666,"props":4751,"children":4752},{"style":1202},[4753],{"type":44,"value":854},{"type":39,"tag":666,"props":4755,"children":4756},{"style":766},[4757],{"type":44,"value":3004},{"type":39,"tag":666,"props":4759,"children":4760},{"style":826},[4761],{"type":44,"value":1168},{"type":39,"tag":666,"props":4763,"children":4764},{"style":766},[4765],{"type":44,"value":1173},{"type":39,"tag":666,"props":4767,"children":4768},{"class":668,"line":2516},[4769,4774,4778,4782,4787,4791],{"type":39,"tag":666,"props":4770,"children":4771},{"style":766},[4772],{"type":44,"value":4773},"    ;",{"type":39,"tag":666,"props":4775,"children":4776},{"style":1202},[4777],{"type":44,"value":854},{"type":39,"tag":666,"props":4779,"children":4780},{"style":826},[4781],{"type":44,"value":1673},{"type":39,"tag":666,"props":4783,"children":4784},{"style":766},[4785],{"type":44,"value":4786}," ()",{"type":39,"tag":666,"props":4788,"children":4789},{"style":826},[4790],{"type":44,"value":1168},{"type":39,"tag":666,"props":4792,"children":4793},{"style":766},[4794],{"type":44,"value":1173},{"type":39,"tag":666,"props":4796,"children":4797},{"class":668,"line":2524},[4798,4803,4807],{"type":39,"tag":666,"props":4799,"children":4800},{"style":760},[4801],{"type":44,"value":4802},"      await",{"type":39,"tag":666,"props":4804,"children":4805},{"style":847},[4806],{"type":44,"value":2948},{"type":39,"tag":666,"props":4808,"children":4809},{"style":1202},[4810],{"type":44,"value":998},{"type":39,"tag":666,"props":4812,"children":4813},{"class":668,"line":2532},[4814,4819,4823,4827,4831],{"type":39,"tag":666,"props":4815,"children":4816},{"style":847},[4817],{"type":44,"value":4818},"      setUser",{"type":39,"tag":666,"props":4820,"children":4821},{"style":1202},[4822],{"type":44,"value":854},{"type":39,"tag":666,"props":4824,"children":4825},{"style":760},[4826],{"type":44,"value":2601},{"type":39,"tag":666,"props":4828,"children":4829},{"style":847},[4830],{"type":44,"value":785},{"type":39,"tag":666,"props":4832,"children":4833},{"style":1202},[4834],{"type":44,"value":4835},"())\n",{"type":39,"tag":666,"props":4837,"children":4838},{"class":668,"line":3336},[4839,4844,4848,4853],{"type":39,"tag":666,"props":4840,"children":4841},{"style":847},[4842],{"type":44,"value":4843},"      setLoading",{"type":39,"tag":666,"props":4845,"children":4846},{"style":1202},[4847],{"type":44,"value":854},{"type":39,"tag":666,"props":4849,"children":4850},{"style":4727},[4851],{"type":44,"value":4852},"false",{"type":39,"tag":666,"props":4854,"children":4855},{"style":1202},[4856],{"type":44,"value":890},{"type":39,"tag":666,"props":4858,"children":4859},{"class":668,"line":3361},[4860,4864],{"type":39,"tag":666,"props":4861,"children":4862},{"style":766},[4863],{"type":44,"value":2333},{"type":39,"tag":666,"props":4865,"children":4866},{"style":1202},[4867],{"type":44,"value":4868},")()\n",{"type":39,"tag":666,"props":4870,"children":4871},{"class":668,"line":3370},[4872,4877,4881,4885,4889,4894,4898,4903,4907,4911,4915,4919,4924],{"type":39,"tag":666,"props":4873,"children":4874},{"style":760},[4875],{"type":44,"value":4876},"    return",{"type":39,"tag":666,"props":4878,"children":4879},{"style":847},[4880],{"type":44,"value":3608},{"type":39,"tag":666,"props":4882,"children":4883},{"style":1202},[4884],{"type":44,"value":854},{"type":39,"tag":666,"props":4886,"children":4887},{"style":766},[4888],{"type":44,"value":854},{"type":39,"tag":666,"props":4890,"children":4891},{"style":1128},[4892],{"type":44,"value":4893},"_event",{"type":39,"tag":666,"props":4895,"children":4896},{"style":766},[4897],{"type":44,"value":780},{"type":39,"tag":666,"props":4899,"children":4900},{"style":1128},[4901],{"type":44,"value":4902}," currentUser",{"type":39,"tag":666,"props":4904,"children":4905},{"style":766},[4906],{"type":44,"value":1163},{"type":39,"tag":666,"props":4908,"children":4909},{"style":826},[4910],{"type":44,"value":1168},{"type":39,"tag":666,"props":4912,"children":4913},{"style":847},[4914],{"type":44,"value":4658},{"type":39,"tag":666,"props":4916,"children":4917},{"style":1202},[4918],{"type":44,"value":854},{"type":39,"tag":666,"props":4920,"children":4921},{"style":772},[4922],{"type":44,"value":4923},"currentUser",{"type":39,"tag":666,"props":4925,"children":4926},{"style":1202},[4927],{"type":44,"value":4928},"))\n",{"type":39,"tag":666,"props":4930,"children":4931},{"class":668,"line":3400},[4932,4937],{"type":39,"tag":666,"props":4933,"children":4934},{"style":766},[4935],{"type":44,"value":4936},"  },",{"type":39,"tag":666,"props":4938,"children":4939},{"style":1202},[4940],{"type":44,"value":4941}," [])\n",{"type":39,"tag":666,"props":4943,"children":4944},{"class":668,"line":3408},[4945],{"type":39,"tag":666,"props":4946,"children":4947},{"emptyLinePlaceholder":816},[4948],{"type":44,"value":819},{"type":39,"tag":666,"props":4950,"children":4951},{"class":668,"line":23},[4952,4956,4960,4964,4968,4972,4976,4980,4984,4988,4992],{"type":39,"tag":666,"props":4953,"children":4954},{"style":826},[4955],{"type":44,"value":1181},{"type":39,"tag":666,"props":4957,"children":4958},{"style":772},[4959],{"type":44,"value":1683},{"type":39,"tag":666,"props":4961,"children":4962},{"style":766},[4963],{"type":44,"value":1191},{"type":39,"tag":666,"props":4965,"children":4966},{"style":826},[4967],{"type":44,"value":1120},{"type":39,"tag":666,"props":4969,"children":4970},{"style":766},[4971],{"type":44,"value":1125},{"type":39,"tag":666,"props":4973,"children":4974},{"style":1128},[4975],{"type":44,"value":1372},{"type":39,"tag":666,"props":4977,"children":4978},{"style":766},[4979],{"type":44,"value":780},{"type":39,"tag":666,"props":4981,"children":4982},{"style":1128},[4983],{"type":44,"value":1709},{"type":39,"tag":666,"props":4985,"children":4986},{"style":766},[4987],{"type":44,"value":1163},{"type":39,"tag":666,"props":4989,"children":4990},{"style":826},[4991],{"type":44,"value":1168},{"type":39,"tag":666,"props":4993,"children":4994},{"style":766},[4995],{"type":44,"value":1173},{"type":39,"tag":666,"props":4997,"children":4998},{"class":668,"line":3461},[4999,5003,5007,5011,5015,5019,5023,5027,5031,5035],{"type":39,"tag":666,"props":5000,"children":5001},{"style":826},[5002],{"type":44,"value":1745},{"type":39,"tag":666,"props":5004,"children":5005},{"style":772},[5006],{"type":44,"value":4902},{"type":39,"tag":666,"props":5008,"children":5009},{"style":766},[5010],{"type":44,"value":1191},{"type":39,"tag":666,"props":5012,"children":5013},{"style":760},[5014],{"type":44,"value":844},{"type":39,"tag":666,"props":5016,"children":5017},{"style":847},[5018],{"type":44,"value":775},{"type":39,"tag":666,"props":5020,"children":5021},{"style":1202},[5022],{"type":44,"value":854},{"type":39,"tag":666,"props":5024,"children":5025},{"style":772},[5026],{"type":44,"value":1372},{"type":39,"tag":666,"props":5028,"children":5029},{"style":766},[5030],{"type":44,"value":780},{"type":39,"tag":666,"props":5032,"children":5033},{"style":772},[5034],{"type":44,"value":1709},{"type":39,"tag":666,"props":5036,"children":5037},{"style":1202},[5038],{"type":44,"value":890},{"type":39,"tag":666,"props":5040,"children":5041},{"class":668,"line":3469},[5042,5047,5051,5055],{"type":39,"tag":666,"props":5043,"children":5044},{"style":847},[5045],{"type":44,"value":5046},"    setUser",{"type":39,"tag":666,"props":5048,"children":5049},{"style":1202},[5050],{"type":44,"value":854},{"type":39,"tag":666,"props":5052,"children":5053},{"style":772},[5054],{"type":44,"value":4923},{"type":39,"tag":666,"props":5056,"children":5057},{"style":1202},[5058],{"type":44,"value":890},{"type":39,"tag":666,"props":5060,"children":5061},{"class":668,"line":3477},[5062],{"type":39,"tag":666,"props":5063,"children":5064},{"style":766},[5065],{"type":44,"value":2019},{"type":39,"tag":666,"props":5067,"children":5068},{"class":668,"line":3505},[5069],{"type":39,"tag":666,"props":5070,"children":5071},{"emptyLinePlaceholder":816},[5072],{"type":44,"value":819},{"type":39,"tag":666,"props":5074,"children":5075},{"class":668,"line":3558},[5076,5080,5085,5089,5093,5097,5101,5105,5109,5113,5117],{"type":39,"tag":666,"props":5077,"children":5078},{"style":826},[5079],{"type":44,"value":1181},{"type":39,"tag":666,"props":5081,"children":5082},{"style":772},[5083],{"type":44,"value":5084}," handleGoogleLogin",{"type":39,"tag":666,"props":5086,"children":5087},{"style":766},[5088],{"type":44,"value":1191},{"type":39,"tag":666,"props":5090,"children":5091},{"style":766},[5092],{"type":44,"value":4786},{"type":39,"tag":666,"props":5094,"children":5095},{"style":826},[5096],{"type":44,"value":1168},{"type":39,"tag":666,"props":5098,"children":5099},{"style":847},[5100],{"type":44,"value":2716},{"type":39,"tag":666,"props":5102,"children":5103},{"style":1202},[5104],{"type":44,"value":854},{"type":39,"tag":666,"props":5106,"children":5107},{"style":766},[5108],{"type":44,"value":859},{"type":39,"tag":666,"props":5110,"children":5111},{"style":679},[5112],{"type":44,"value":2786},{"type":39,"tag":666,"props":5114,"children":5115},{"style":766},[5116],{"type":44,"value":859},{"type":39,"tag":666,"props":5118,"children":5119},{"style":1202},[5120],{"type":44,"value":890},{"type":39,"tag":666,"props":5122,"children":5123},{"class":668,"line":3566},[5124],{"type":39,"tag":666,"props":5125,"children":5126},{"emptyLinePlaceholder":816},[5127],{"type":44,"value":819},{"type":39,"tag":666,"props":5129,"children":5131},{"class":668,"line":5130},31,[5132,5136,5141,5145,5149,5153,5157],{"type":39,"tag":666,"props":5133,"children":5134},{"style":826},[5135],{"type":44,"value":1181},{"type":39,"tag":666,"props":5137,"children":5138},{"style":772},[5139],{"type":44,"value":5140}," handleSignOut",{"type":39,"tag":666,"props":5142,"children":5143},{"style":766},[5144],{"type":44,"value":1191},{"type":39,"tag":666,"props":5146,"children":5147},{"style":826},[5148],{"type":44,"value":1120},{"type":39,"tag":666,"props":5150,"children":5151},{"style":766},[5152],{"type":44,"value":4786},{"type":39,"tag":666,"props":5154,"children":5155},{"style":826},[5156],{"type":44,"value":1168},{"type":39,"tag":666,"props":5158,"children":5159},{"style":766},[5160],{"type":44,"value":1173},{"type":39,"tag":666,"props":5162,"children":5164},{"class":668,"line":5163},32,[5165,5170,5174],{"type":39,"tag":666,"props":5166,"children":5167},{"style":760},[5168],{"type":44,"value":5169},"    await",{"type":39,"tag":666,"props":5171,"children":5172},{"style":847},[5173],{"type":44,"value":2566},{"type":39,"tag":666,"props":5175,"children":5176},{"style":1202},[5177],{"type":44,"value":998},{"type":39,"tag":666,"props":5179,"children":5181},{"class":668,"line":5180},33,[5182,5186,5190,5194],{"type":39,"tag":666,"props":5183,"children":5184},{"style":847},[5185],{"type":44,"value":5046},{"type":39,"tag":666,"props":5187,"children":5188},{"style":1202},[5189],{"type":44,"value":854},{"type":39,"tag":666,"props":5191,"children":5192},{"style":766},[5193],{"type":44,"value":4679},{"type":39,"tag":666,"props":5195,"children":5196},{"style":1202},[5197],{"type":44,"value":890},{"type":39,"tag":666,"props":5199,"children":5201},{"class":668,"line":5200},34,[5202],{"type":39,"tag":666,"props":5203,"children":5204},{"style":766},[5205],{"type":44,"value":2019},{"type":39,"tag":666,"props":5207,"children":5209},{"class":668,"line":5208},35,[5210],{"type":39,"tag":666,"props":5211,"children":5212},{"emptyLinePlaceholder":816},[5213],{"type":44,"value":819},{"type":39,"tag":666,"props":5215,"children":5217},{"class":668,"line":5216},36,[5218,5222,5226,5230,5234,5238,5243,5247,5252,5257,5262,5266],{"type":39,"tag":666,"props":5219,"children":5220},{"style":760},[5221],{"type":44,"value":1212},{"type":39,"tag":666,"props":5223,"children":5224},{"style":1202},[5225],{"type":44,"value":1125},{"type":39,"tag":666,"props":5227,"children":5228},{"style":772},[5229],{"type":44,"value":4699},{"type":39,"tag":666,"props":5231,"children":5232},{"style":1202},[5233],{"type":44,"value":1230},{"type":39,"tag":666,"props":5235,"children":5236},{"style":760},[5237],{"type":44,"value":1235},{"type":39,"tag":666,"props":5239,"children":5240},{"style":766},[5241],{"type":44,"value":5242}," \u003C",{"type":39,"tag":666,"props":5244,"children":5245},{"style":1202},[5246],{"type":44,"value":47},{"type":39,"tag":666,"props":5248,"children":5249},{"style":766},[5250],{"type":44,"value":5251},">",{"type":39,"tag":666,"props":5253,"children":5254},{"style":772},[5255],{"type":44,"value":5256},"Loading...",{"type":39,"tag":666,"props":5258,"children":5259},{"style":766},[5260],{"type":44,"value":5261},"\u003C\u002F",{"type":39,"tag":666,"props":5263,"children":5264},{"style":1202},[5265],{"type":44,"value":47},{"type":39,"tag":666,"props":5267,"children":5268},{"style":766},[5269],{"type":44,"value":5270},">\n",{"type":39,"tag":666,"props":5272,"children":5274},{"class":668,"line":5273},37,[5275],{"type":39,"tag":666,"props":5276,"children":5277},{"style":965},[5278],{"type":44,"value":5279},"  \u002F\u002F Render login form or user details based on `user` state\n",{"type":39,"tag":666,"props":5281,"children":5283},{"class":668,"line":5282},38,[5284],{"type":39,"tag":666,"props":5285,"children":5286},{"style":766},[5287],{"type":44,"value":1389},{"type":39,"tag":107,"props":5289,"children":5291},{"id":5290},"error-handling",[5292],{"type":44,"value":5293},"Error Handling",{"type":39,"tag":47,"props":5295,"children":5296},{},[5297,5302],{"type":39,"tag":73,"props":5298,"children":5300},{"className":5299},[],[5301],{"type":44,"value":78},{"type":44,"value":5303}," throws two error classes:",{"type":39,"tag":245,"props":5305,"children":5306},{},[5307,5342],{"type":39,"tag":249,"props":5308,"children":5309},{},[5310,5319,5321,5326,5328,5333,5335,5341],{"type":39,"tag":67,"props":5311,"children":5312},{},[5313],{"type":39,"tag":73,"props":5314,"children":5316},{"className":5315},[],[5317],{"type":44,"value":5318},"AuthError",{"type":44,"value":5320}," — Thrown by auth operations. Has ",{"type":39,"tag":73,"props":5322,"children":5324},{"className":5323},[],[5325],{"type":44,"value":1997},{"type":44,"value":5327},", optional ",{"type":39,"tag":73,"props":5329,"children":5331},{"className":5330},[],[5332],{"type":44,"value":1950},{"type":44,"value":5334}," (HTTP status code), and optional ",{"type":39,"tag":73,"props":5336,"children":5338},{"className":5337},[],[5339],{"type":44,"value":5340},"cause",{"type":44,"value":904},{"type":39,"tag":249,"props":5343,"children":5344},{},[5345,5354],{"type":39,"tag":67,"props":5346,"children":5347},{},[5348],{"type":39,"tag":73,"props":5349,"children":5351},{"className":5350},[],[5352],{"type":44,"value":5353},"MissingIdentityError",{"type":44,"value":5355}," — Thrown when Identity is not configured in the current environment.",{"type":39,"tag":47,"props":5357,"children":5358},{},[5359,5364,5365,5371,5373,5378,5379,5384],{"type":39,"tag":73,"props":5360,"children":5362},{"className":5361},[],[5363],{"type":44,"value":1398},{"type":44,"value":90},{"type":39,"tag":73,"props":5366,"children":5368},{"className":5367},[],[5369],{"type":44,"value":5370},"isAuthenticated()",{"type":44,"value":5372}," never throw — they return ",{"type":39,"tag":73,"props":5374,"children":5376},{"className":5375},[],[5377],{"type":44,"value":4679},{"type":44,"value":90},{"type":39,"tag":73,"props":5380,"children":5382},{"className":5381},[],[5383],{"type":44,"value":4852},{"type":44,"value":5385}," respectively on failure.",{"type":39,"tag":400,"props":5387,"children":5388},{},[5389,5405],{"type":39,"tag":404,"props":5390,"children":5391},{},[5392],{"type":39,"tag":408,"props":5393,"children":5394},{},[5395,5400],{"type":39,"tag":412,"props":5396,"children":5397},{},[5398],{"type":44,"value":5399},"Status",{"type":39,"tag":412,"props":5401,"children":5402},{},[5403],{"type":44,"value":5404},"Meaning",{"type":39,"tag":431,"props":5406,"children":5407},{},[5408,5428,5441,5454,5467],{"type":39,"tag":408,"props":5409,"children":5410},{},[5411,5416],{"type":39,"tag":438,"props":5412,"children":5413},{},[5414],{"type":44,"value":5415},"400",{"type":39,"tag":438,"props":5417,"children":5418},{},[5419,5421,5427],{"type":44,"value":5420},"Invalid login credentials — wrong email\u002Fpassword (GoTrue ",{"type":39,"tag":73,"props":5422,"children":5424},{"className":5423},[],[5425],{"type":44,"value":5426},"invalid_grant",{"type":44,"value":1163},{"type":39,"tag":408,"props":5429,"children":5430},{},[5431,5436],{"type":39,"tag":438,"props":5432,"children":5433},{},[5434],{"type":44,"value":5435},"401",{"type":39,"tag":438,"props":5437,"children":5438},{},[5439],{"type":44,"value":5440},"Missing, invalid, or expired bearer token on an authenticated endpoint",{"type":39,"tag":408,"props":5442,"children":5443},{},[5444,5449],{"type":39,"tag":438,"props":5445,"children":5446},{},[5447],{"type":44,"value":5448},"403",{"type":39,"tag":438,"props":5450,"children":5451},{},[5452],{"type":44,"value":5453},"Action not allowed (e.g., signups disabled)",{"type":39,"tag":408,"props":5455,"children":5456},{},[5457,5462],{"type":39,"tag":438,"props":5458,"children":5459},{},[5460],{"type":44,"value":5461},"422",{"type":39,"tag":438,"props":5463,"children":5464},{},[5465],{"type":44,"value":5466},"Validation error (e.g., weak password, malformed email)",{"type":39,"tag":408,"props":5468,"children":5469},{},[5470,5475],{"type":39,"tag":438,"props":5471,"children":5472},{},[5473],{"type":44,"value":5474},"404",{"type":39,"tag":438,"props":5476,"children":5477},{},[5478],{"type":44,"value":5479},"User or resource not found",{"type":39,"tag":47,"props":5481,"children":5482},{},[5483,5485,5491,5493,5498,5500,5505,5506,5511,5513,5518,5520,5526,5528,5533,5535,5540],{"type":44,"value":5484},"Note: in the browser, ",{"type":39,"tag":73,"props":5486,"children":5488},{"className":5487},[],[5489],{"type":44,"value":5490},"login()",{"type":44,"value":5492}," surfaces gotrue-js failures as an ",{"type":39,"tag":73,"props":5494,"children":5496},{"className":5495},[],[5497],{"type":44,"value":5318},{"type":44,"value":5499}," with ",{"type":39,"tag":73,"props":5501,"children":5503},{"className":5502},[],[5504],{"type":44,"value":1950},{"type":44,"value":82},{"type":39,"tag":67,"props":5507,"children":5508},{},[5509],{"type":44,"value":5510},"undefined",{"type":44,"value":5512}," (the HTTP status isn't propagated), so don't branch on ",{"type":39,"tag":73,"props":5514,"children":5516},{"className":5515},[],[5517],{"type":44,"value":1950},{"type":44,"value":5519}," for bad-credentials UX there — fall back to ",{"type":39,"tag":73,"props":5521,"children":5523},{"className":5522},[],[5524],{"type":44,"value":5525},"error.message",{"type":44,"value":5527},". Server-side (",{"type":39,"tag":73,"props":5529,"children":5531},{"className":5530},[],[5532],{"type":44,"value":5490},{"type":44,"value":5534}," in a Function) passes the real status through, so ",{"type":39,"tag":73,"props":5536,"children":5538},{"className":5537},[],[5539],{"type":44,"value":5415},{"type":44,"value":5541}," is reliable.",{"type":39,"tag":107,"props":5543,"children":5545},{"id":5544},"identity-event-functions",[5546],{"type":44,"value":5547},"Identity Event Functions",{"type":39,"tag":47,"props":5549,"children":5550},{},[5551,5553,5558],{"type":44,"value":5552},"Functions can subscribe to Identity lifecycle events by exporting an object whose properties are named event handlers. See the ",{"type":39,"tag":67,"props":5554,"children":5555},{},[5556],{"type":44,"value":5557},"netlify-functions",{"type":44,"value":5559}," skill for the full event-handler pattern.",{"type":39,"tag":47,"props":5561,"children":5562},{},[5563,5565,5571,5572,5578,5580,5586,5588,5594,5596,5606],{"type":44,"value":5564},"The typed handler API below (the ",{"type":39,"tag":73,"props":5566,"children":5568},{"className":5567},[],[5569],{"type":44,"value":5570},"userSignup",{"type":44,"value":303},{"type":39,"tag":73,"props":5573,"children":5575},{"className":5574},[],[5576],{"type":44,"value":5577},"userValidate",{"type":44,"value":5579},"\u002F… object export, the typed ",{"type":39,"tag":73,"props":5581,"children":5583},{"className":5582},[],[5584],{"type":44,"value":5585},"*Event",{"type":44,"value":5587}," types, and ",{"type":39,"tag":73,"props":5589,"children":5591},{"className":5590},[],[5592],{"type":44,"value":5593},"event.deny()",{"type":44,"value":5595},") requires ",{"type":39,"tag":67,"props":5597,"children":5598},{},[5599,5604],{"type":39,"tag":73,"props":5600,"children":5602},{"className":5601},[],[5603],{"type":44,"value":1091},{"type":44,"value":5605}," ≥ 5.2.0",{"type":44,"value":5607}," — it isn't present in 5.1.x. On older installs, use the legacy filename convention described at the end of this section.",{"type":39,"tag":47,"props":5609,"children":5610},{},[5611],{"type":39,"tag":67,"props":5612,"children":5613},{},[5614],{"type":44,"value":5615},"Available identity handlers:",{"type":39,"tag":400,"props":5617,"children":5618},{},[5619,5635],{"type":39,"tag":404,"props":5620,"children":5621},{},[5622],{"type":39,"tag":408,"props":5623,"children":5624},{},[5625,5630],{"type":39,"tag":412,"props":5626,"children":5627},{},[5628],{"type":44,"value":5629},"Handler",{"type":39,"tag":412,"props":5631,"children":5632},{},[5633],{"type":44,"value":5634},"Trigger",{"type":39,"tag":431,"props":5636,"children":5637},{},[5638,5654,5670,5687,5704],{"type":39,"tag":408,"props":5639,"children":5640},{},[5641,5649],{"type":39,"tag":438,"props":5642,"children":5643},{},[5644],{"type":39,"tag":73,"props":5645,"children":5647},{"className":5646},[],[5648],{"type":44,"value":5577},{"type":39,"tag":438,"props":5650,"children":5651},{},[5652],{"type":44,"value":5653},"User attempts to sign up. Can deny.",{"type":39,"tag":408,"props":5655,"children":5656},{},[5657,5665],{"type":39,"tag":438,"props":5658,"children":5659},{},[5660],{"type":39,"tag":73,"props":5661,"children":5663},{"className":5662},[],[5664],{"type":44,"value":5570},{"type":39,"tag":438,"props":5666,"children":5667},{},[5668],{"type":44,"value":5669},"User completes signup. Can deny or mutate.",{"type":39,"tag":408,"props":5671,"children":5672},{},[5673,5682],{"type":39,"tag":438,"props":5674,"children":5675},{},[5676],{"type":39,"tag":73,"props":5677,"children":5679},{"className":5678},[],[5680],{"type":44,"value":5681},"userLogin",{"type":39,"tag":438,"props":5683,"children":5684},{},[5685],{"type":44,"value":5686},"User logs in. Can deny or mutate.",{"type":39,"tag":408,"props":5688,"children":5689},{},[5690,5699],{"type":39,"tag":438,"props":5691,"children":5692},{},[5693],{"type":39,"tag":73,"props":5694,"children":5696},{"className":5695},[],[5697],{"type":44,"value":5698},"userModified",{"type":39,"tag":438,"props":5700,"children":5701},{},[5702],{"type":44,"value":5703},"User profile is updated. Can deny or mutate.",{"type":39,"tag":408,"props":5705,"children":5706},{},[5707,5716],{"type":39,"tag":438,"props":5708,"children":5709},{},[5710],{"type":39,"tag":73,"props":5711,"children":5713},{"className":5712},[],[5714],{"type":44,"value":5715},"userDeleted",{"type":39,"tag":438,"props":5717,"children":5718},{},[5719],{"type":44,"value":5720},"User is deleted. Notification only.",{"type":39,"tag":47,"props":5722,"children":5723},{},[5724,5726,5731,5733,5739,5740,5746,5747,5753],{"type":44,"value":5725},"Each handler receives a typed event with a parsed ",{"type":39,"tag":73,"props":5727,"children":5729},{"className":5728},[],[5730],{"type":44,"value":933},{"type":44,"value":5732}," object (camelCase fields: ",{"type":39,"tag":73,"props":5734,"children":5736},{"className":5735},[],[5737],{"type":44,"value":5738},"appMetadata",{"type":44,"value":1415},{"type":39,"tag":73,"props":5741,"children":5743},{"className":5742},[],[5744],{"type":44,"value":5745},"userMetadata",{"type":44,"value":1415},{"type":39,"tag":73,"props":5748,"children":5750},{"className":5749},[],[5751],{"type":44,"value":5752},"confirmedAt",{"type":44,"value":5754},", etc.).",{"type":39,"tag":238,"props":5756,"children":5758},{"id":5757},"mutate-the-user",[5759],{"type":44,"value":5760},"Mutate the user",{"type":39,"tag":47,"props":5762,"children":5763},{},[5764,5766,5772],{"type":44,"value":5765},"Return ",{"type":39,"tag":73,"props":5767,"children":5769},{"className":5768},[],[5770],{"type":44,"value":5771},"{ user: ... }",{"type":44,"value":5773}," to substitute the user record before it's persisted. This is the common pattern for role assignment at signup.",{"type":39,"tag":500,"props":5775,"children":5777},{"className":748,"code":5776,"language":750,"meta":508,"style":508},"\u002F\u002F netlify\u002Ffunctions\u002Fidentity.mts\nimport type { UserSignupEvent } from '@netlify\u002Ffunctions'\n\nexport default {\n  userSignup(event: UserSignupEvent) {\n    return {\n      user: {\n        ...event.user,\n        appMetadata: {\n          ...event.user.appMetadata,\n          roles: ['member'],\n        },\n      },\n    }\n  },\n}\n",[5778],{"type":39,"tag":73,"props":5779,"children":5780},{"__ignoreMap":508},[5781,5789,5829,5836,5851,5883,5894,5910,5934,5950,5982,6019,6027,6035,6042,6050],{"type":39,"tag":666,"props":5782,"children":5783},{"class":668,"line":669},[5784],{"type":39,"tag":666,"props":5785,"children":5786},{"style":965},[5787],{"type":44,"value":5788},"\u002F\u002F netlify\u002Ffunctions\u002Fidentity.mts\n",{"type":39,"tag":666,"props":5790,"children":5791},{"class":668,"line":812},[5792,5796,5800,5804,5809,5813,5817,5821,5825],{"type":39,"tag":666,"props":5793,"children":5794},{"style":760},[5795],{"type":44,"value":763},{"type":39,"tag":666,"props":5797,"children":5798},{"style":760},[5799],{"type":44,"value":1065},{"type":39,"tag":666,"props":5801,"children":5802},{"style":766},[5803],{"type":44,"value":769},{"type":39,"tag":666,"props":5805,"children":5806},{"style":772},[5807],{"type":44,"value":5808}," UserSignupEvent",{"type":39,"tag":666,"props":5810,"children":5811},{"style":766},[5812],{"type":44,"value":790},{"type":39,"tag":666,"props":5814,"children":5815},{"style":760},[5816],{"type":44,"value":795},{"type":39,"tag":666,"props":5818,"children":5819},{"style":766},[5820],{"type":44,"value":800},{"type":39,"tag":666,"props":5822,"children":5823},{"style":679},[5824],{"type":44,"value":1091},{"type":39,"tag":666,"props":5826,"children":5827},{"style":766},[5828],{"type":44,"value":809},{"type":39,"tag":666,"props":5830,"children":5831},{"class":668,"line":822},[5832],{"type":39,"tag":666,"props":5833,"children":5834},{"emptyLinePlaceholder":816},[5835],{"type":44,"value":819},{"type":39,"tag":666,"props":5837,"children":5838},{"class":668,"line":893},[5839,5843,5847],{"type":39,"tag":666,"props":5840,"children":5841},{"style":760},[5842],{"type":44,"value":1110},{"type":39,"tag":666,"props":5844,"children":5845},{"style":760},[5846],{"type":44,"value":1115},{"type":39,"tag":666,"props":5848,"children":5849},{"style":766},[5850],{"type":44,"value":1173},{"type":39,"tag":666,"props":5852,"children":5853},{"class":668,"line":27},[5854,5859,5863,5867,5871,5875,5879],{"type":39,"tag":666,"props":5855,"children":5856},{"style":1202},[5857],{"type":44,"value":5858},"  userSignup",{"type":39,"tag":666,"props":5860,"children":5861},{"style":766},[5862],{"type":44,"value":854},{"type":39,"tag":666,"props":5864,"children":5865},{"style":1128},[5866],{"type":44,"value":3727},{"type":39,"tag":666,"props":5868,"children":5869},{"style":766},[5870],{"type":44,"value":1136},{"type":39,"tag":666,"props":5872,"children":5873},{"style":673},[5874],{"type":44,"value":5808},{"type":39,"tag":666,"props":5876,"children":5877},{"style":766},[5878],{"type":44,"value":1163},{"type":39,"tag":666,"props":5880,"children":5881},{"style":766},[5882],{"type":44,"value":1173},{"type":39,"tag":666,"props":5884,"children":5885},{"class":668,"line":961},[5886,5890],{"type":39,"tag":666,"props":5887,"children":5888},{"style":760},[5889],{"type":44,"value":4876},{"type":39,"tag":666,"props":5891,"children":5892},{"style":766},[5893],{"type":44,"value":1173},{"type":39,"tag":666,"props":5895,"children":5896},{"class":668,"line":971},[5897,5902,5906],{"type":39,"tag":666,"props":5898,"children":5899},{"style":1202},[5900],{"type":44,"value":5901},"      user",{"type":39,"tag":666,"props":5903,"children":5904},{"style":766},[5905],{"type":44,"value":1136},{"type":39,"tag":666,"props":5907,"children":5908},{"style":766},[5909],{"type":44,"value":1173},{"type":39,"tag":666,"props":5911,"children":5912},{"class":668,"line":1296},[5913,5918,5922,5926,5930],{"type":39,"tag":666,"props":5914,"children":5915},{"style":766},[5916],{"type":44,"value":5917},"        ...",{"type":39,"tag":666,"props":5919,"children":5920},{"style":772},[5921],{"type":44,"value":3727},{"type":39,"tag":666,"props":5923,"children":5924},{"style":766},[5925],{"type":44,"value":904},{"type":39,"tag":666,"props":5927,"children":5928},{"style":772},[5929],{"type":44,"value":933},{"type":39,"tag":666,"props":5931,"children":5932},{"style":766},[5933],{"type":44,"value":1493},{"type":39,"tag":666,"props":5935,"children":5936},{"class":668,"line":1383},[5937,5942,5946],{"type":39,"tag":666,"props":5938,"children":5939},{"style":1202},[5940],{"type":44,"value":5941},"        appMetadata",{"type":39,"tag":666,"props":5943,"children":5944},{"style":766},[5945],{"type":44,"value":1136},{"type":39,"tag":666,"props":5947,"children":5948},{"style":766},[5949],{"type":44,"value":1173},{"type":39,"tag":666,"props":5951,"children":5952},{"class":668,"line":1580},[5953,5958,5962,5966,5970,5974,5978],{"type":39,"tag":666,"props":5954,"children":5955},{"style":766},[5956],{"type":44,"value":5957},"          ...",{"type":39,"tag":666,"props":5959,"children":5960},{"style":772},[5961],{"type":44,"value":3727},{"type":39,"tag":666,"props":5963,"children":5964},{"style":766},[5965],{"type":44,"value":904},{"type":39,"tag":666,"props":5967,"children":5968},{"style":772},[5969],{"type":44,"value":933},{"type":39,"tag":666,"props":5971,"children":5972},{"style":766},[5973],{"type":44,"value":904},{"type":39,"tag":666,"props":5975,"children":5976},{"style":772},[5977],{"type":44,"value":5738},{"type":39,"tag":666,"props":5979,"children":5980},{"style":766},[5981],{"type":44,"value":1493},{"type":39,"tag":666,"props":5983,"children":5984},{"class":668,"line":1927},[5985,5990,5994,5998,6002,6007,6011,6015],{"type":39,"tag":666,"props":5986,"children":5987},{"style":1202},[5988],{"type":44,"value":5989},"          roles",{"type":39,"tag":666,"props":5991,"children":5992},{"style":766},[5993],{"type":44,"value":1136},{"type":39,"tag":666,"props":5995,"children":5996},{"style":1202},[5997],{"type":44,"value":4347},{"type":39,"tag":666,"props":5999,"children":6000},{"style":766},[6001],{"type":44,"value":859},{"type":39,"tag":666,"props":6003,"children":6004},{"style":679},[6005],{"type":44,"value":6006},"member",{"type":39,"tag":666,"props":6008,"children":6009},{"style":766},[6010],{"type":44,"value":859},{"type":39,"tag":666,"props":6012,"children":6013},{"style":1202},[6014],{"type":44,"value":4365},{"type":39,"tag":666,"props":6016,"children":6017},{"style":766},[6018],{"type":44,"value":1493},{"type":39,"tag":666,"props":6020,"children":6021},{"class":668,"line":2004},[6022],{"type":39,"tag":666,"props":6023,"children":6024},{"style":766},[6025],{"type":44,"value":6026},"        },\n",{"type":39,"tag":666,"props":6028,"children":6029},{"class":668,"line":2013},[6030],{"type":39,"tag":666,"props":6031,"children":6032},{"style":766},[6033],{"type":44,"value":6034},"      },\n",{"type":39,"tag":666,"props":6036,"children":6037},{"class":668,"line":2022},[6038],{"type":39,"tag":666,"props":6039,"children":6040},{"style":766},[6041],{"type":44,"value":2010},{"type":39,"tag":666,"props":6043,"children":6044},{"class":668,"line":2446},[6045],{"type":39,"tag":666,"props":6046,"children":6047},{"style":766},[6048],{"type":44,"value":6049},"  },\n",{"type":39,"tag":666,"props":6051,"children":6052},{"class":668,"line":2516},[6053],{"type":39,"tag":666,"props":6054,"children":6055},{"style":766},[6056],{"type":44,"value":1389},{"type":39,"tag":238,"props":6058,"children":6060},{"id":6059},"deny-an-action",[6061],{"type":44,"value":6062},"Deny an action",{"type":39,"tag":47,"props":6064,"children":6065},{},[6066,6068,6073,6075,6080],{"type":44,"value":6067},"Call ",{"type":39,"tag":73,"props":6069,"children":6071},{"className":6070},[],[6072],{"type":44,"value":5593},{"type":44,"value":6074}," to reject a signup, login, validation, or modification. The end user receives a 401. Do not throw — ",{"type":39,"tag":73,"props":6076,"children":6078},{"className":6077},[],[6079],{"type":44,"value":5593},{"type":44,"value":6081}," is the canonical denial mechanism and does not produce an error in observability.",{"type":39,"tag":500,"props":6083,"children":6085},{"className":748,"code":6084,"language":750,"meta":508,"style":508},"import type { UserValidateEvent } from '@netlify\u002Ffunctions'\n\nexport default {\n  userValidate(event: UserValidateEvent) {\n    if (!event.user.email?.endsWith('@example.com')) {\n      return event.deny()\n    }\n  },\n}\n",[6086],{"type":39,"tag":73,"props":6087,"children":6088},{"__ignoreMap":508},[6089,6129,6136,6151,6183,6253,6279,6286,6293],{"type":39,"tag":666,"props":6090,"children":6091},{"class":668,"line":669},[6092,6096,6100,6104,6109,6113,6117,6121,6125],{"type":39,"tag":666,"props":6093,"children":6094},{"style":760},[6095],{"type":44,"value":763},{"type":39,"tag":666,"props":6097,"children":6098},{"style":760},[6099],{"type":44,"value":1065},{"type":39,"tag":666,"props":6101,"children":6102},{"style":766},[6103],{"type":44,"value":769},{"type":39,"tag":666,"props":6105,"children":6106},{"style":772},[6107],{"type":44,"value":6108}," UserValidateEvent",{"type":39,"tag":666,"props":6110,"children":6111},{"style":766},[6112],{"type":44,"value":790},{"type":39,"tag":666,"props":6114,"children":6115},{"style":760},[6116],{"type":44,"value":795},{"type":39,"tag":666,"props":6118,"children":6119},{"style":766},[6120],{"type":44,"value":800},{"type":39,"tag":666,"props":6122,"children":6123},{"style":679},[6124],{"type":44,"value":1091},{"type":39,"tag":666,"props":6126,"children":6127},{"style":766},[6128],{"type":44,"value":809},{"type":39,"tag":666,"props":6130,"children":6131},{"class":668,"line":812},[6132],{"type":39,"tag":666,"props":6133,"children":6134},{"emptyLinePlaceholder":816},[6135],{"type":44,"value":819},{"type":39,"tag":666,"props":6137,"children":6138},{"class":668,"line":822},[6139,6143,6147],{"type":39,"tag":666,"props":6140,"children":6141},{"style":760},[6142],{"type":44,"value":1110},{"type":39,"tag":666,"props":6144,"children":6145},{"style":760},[6146],{"type":44,"value":1115},{"type":39,"tag":666,"props":6148,"children":6149},{"style":766},[6150],{"type":44,"value":1173},{"type":39,"tag":666,"props":6152,"children":6153},{"class":668,"line":893},[6154,6159,6163,6167,6171,6175,6179],{"type":39,"tag":666,"props":6155,"children":6156},{"style":1202},[6157],{"type":44,"value":6158},"  userValidate",{"type":39,"tag":666,"props":6160,"children":6161},{"style":766},[6162],{"type":44,"value":854},{"type":39,"tag":666,"props":6164,"children":6165},{"style":1128},[6166],{"type":44,"value":3727},{"type":39,"tag":666,"props":6168,"children":6169},{"style":766},[6170],{"type":44,"value":1136},{"type":39,"tag":666,"props":6172,"children":6173},{"style":673},[6174],{"type":44,"value":6108},{"type":39,"tag":666,"props":6176,"children":6177},{"style":766},[6178],{"type":44,"value":1163},{"type":39,"tag":666,"props":6180,"children":6181},{"style":766},[6182],{"type":44,"value":1173},{"type":39,"tag":666,"props":6184,"children":6185},{"class":668,"line":27},[6186,6190,6194,6198,6202,6206,6210,6214,6218,6222,6227,6231,6235,6240,6244,6249],{"type":39,"tag":666,"props":6187,"children":6188},{"style":760},[6189],{"type":44,"value":1883},{"type":39,"tag":666,"props":6191,"children":6192},{"style":1202},[6193],{"type":44,"value":1125},{"type":39,"tag":666,"props":6195,"children":6196},{"style":766},[6197],{"type":44,"value":1221},{"type":39,"tag":666,"props":6199,"children":6200},{"style":772},[6201],{"type":44,"value":3727},{"type":39,"tag":666,"props":6203,"children":6204},{"style":766},[6205],{"type":44,"value":904},{"type":39,"tag":666,"props":6207,"children":6208},{"style":772},[6209],{"type":44,"value":933},{"type":39,"tag":666,"props":6211,"children":6212},{"style":766},[6213],{"type":44,"value":904},{"type":39,"tag":666,"props":6215,"children":6216},{"style":772},[6217],{"type":44,"value":1372},{"type":39,"tag":666,"props":6219,"children":6220},{"style":766},[6221],{"type":44,"value":3187},{"type":39,"tag":666,"props":6223,"children":6224},{"style":847},[6225],{"type":44,"value":6226},"endsWith",{"type":39,"tag":666,"props":6228,"children":6229},{"style":1202},[6230],{"type":44,"value":854},{"type":39,"tag":666,"props":6232,"children":6233},{"style":766},[6234],{"type":44,"value":859},{"type":39,"tag":666,"props":6236,"children":6237},{"style":679},[6238],{"type":44,"value":6239},"@example.com",{"type":39,"tag":666,"props":6241,"children":6242},{"style":766},[6243],{"type":44,"value":859},{"type":39,"tag":666,"props":6245,"children":6246},{"style":1202},[6247],{"type":44,"value":6248},")) ",{"type":39,"tag":666,"props":6250,"children":6251},{"style":766},[6252],{"type":44,"value":1875},{"type":39,"tag":666,"props":6254,"children":6255},{"class":668,"line":961},[6256,6261,6266,6270,6275],{"type":39,"tag":666,"props":6257,"children":6258},{"style":760},[6259],{"type":44,"value":6260},"      return",{"type":39,"tag":666,"props":6262,"children":6263},{"style":772},[6264],{"type":44,"value":6265}," event",{"type":39,"tag":666,"props":6267,"children":6268},{"style":766},[6269],{"type":44,"value":904},{"type":39,"tag":666,"props":6271,"children":6272},{"style":847},[6273],{"type":44,"value":6274},"deny",{"type":39,"tag":666,"props":6276,"children":6277},{"style":1202},[6278],{"type":44,"value":998},{"type":39,"tag":666,"props":6280,"children":6281},{"class":668,"line":971},[6282],{"type":39,"tag":666,"props":6283,"children":6284},{"style":766},[6285],{"type":44,"value":2010},{"type":39,"tag":666,"props":6287,"children":6288},{"class":668,"line":1296},[6289],{"type":39,"tag":666,"props":6290,"children":6291},{"style":766},[6292],{"type":44,"value":6049},{"type":39,"tag":666,"props":6294,"children":6295},{"class":668,"line":1383},[6296],{"type":39,"tag":666,"props":6297,"children":6298},{"style":766},[6299],{"type":44,"value":1389},{"type":39,"tag":47,"props":6301,"children":6302},{},[6303,6305,6310],{"type":44,"value":6304},"If multiple functions subscribe to the same event, the first to call ",{"type":39,"tag":73,"props":6306,"children":6308},{"className":6307},[],[6309],{"type":44,"value":5593},{"type":44,"value":6311}," aborts the chain — subsequent functions are not invoked.",{"type":39,"tag":238,"props":6313,"children":6315},{"id":6314},"legacy-filename-convention",[6316],{"type":44,"value":6317},"Legacy filename convention",{"type":39,"tag":47,"props":6319,"children":6320},{},[6321,6323,6329,6330,6336,6337,6343,6345,6351],{"type":44,"value":6322},"The previous syntax — files named ",{"type":39,"tag":73,"props":6324,"children":6326},{"className":6325},[],[6327],{"type":44,"value":6328},"identity-validate.ts",{"type":44,"value":1415},{"type":39,"tag":73,"props":6331,"children":6333},{"className":6332},[],[6334],{"type":44,"value":6335},"identity-signup.ts",{"type":44,"value":1415},{"type":39,"tag":73,"props":6338,"children":6340},{"className":6339},[],[6341],{"type":44,"value":6342},"identity-login.ts",{"type":44,"value":6344},", exporting ",{"type":39,"tag":73,"props":6346,"children":6348},{"className":6347},[],[6349],{"type":44,"value":6350},"handler",{"type":44,"value":6352}," and signaling denial via non-2xx response — still works. New functions should prefer the typed handler syntax above.",{"type":39,"tag":107,"props":6354,"children":6356},{"id":6355},"roles-and-authorization",[6357],{"type":44,"value":6358},"Roles and Authorization",{"type":39,"tag":238,"props":6360,"children":6362},{"id":6361},"first-admin-user",[6363],{"type":44,"value":6364},"First Admin User",{"type":39,"tag":47,"props":6366,"children":6367},{},[6368],{"type":44,"value":6369},"The first admin user cannot be created through code alone. You must direct the user to set it up through the Netlify UI:",{"type":39,"tag":370,"props":6371,"children":6372},{},[6373,6391,6403,6408],{"type":39,"tag":249,"props":6374,"children":6375},{},[6376,6378,6383,6385,6390],{"type":44,"value":6377},"Go to ",{"type":39,"tag":67,"props":6379,"children":6380},{},[6381],{"type":44,"value":6382},"Project configuration > Identity",{"type":44,"value":6384}," in the Netlify dashboard (",{"type":39,"tag":73,"props":6386,"children":6388},{"className":6387},[],[6389],{"type":44,"value":234},{"type":44,"value":1163},{"type":39,"tag":249,"props":6392,"children":6393},{},[6394,6396,6401],{"type":44,"value":6395},"Click ",{"type":39,"tag":67,"props":6397,"children":6398},{},[6399],{"type":44,"value":6400},"Invite users",{"type":44,"value":6402}," and enter the admin user's email address",{"type":39,"tag":249,"props":6404,"children":6405},{},[6406],{"type":44,"value":6407},"After the user accepts the invite, click the user in the Identity list to open their detail page",{"type":39,"tag":249,"props":6409,"children":6410},{},[6411,6413,6418,6420,6426],{"type":44,"value":6412},"In the ",{"type":39,"tag":67,"props":6414,"children":6415},{},[6416],{"type":44,"value":6417},"Roles",{"type":44,"value":6419}," field, add the ",{"type":39,"tag":73,"props":6421,"children":6423},{"className":6422},[],[6424],{"type":44,"value":6425},"admin",{"type":44,"value":6427}," role and save",{"type":39,"tag":47,"props":6429,"children":6430},{},[6431,6433,6439],{"type":44,"value":6432},"Once the first admin exists, subsequent users can be managed programmatically using Identity event functions (e.g., assigning roles in ",{"type":39,"tag":73,"props":6434,"children":6436},{"className":6435},[],[6437],{"type":44,"value":6438},"identity-signup",{"type":44,"value":6440},") or role-based redirects.",{"type":39,"tag":245,"props":6442,"children":6443},{},[6444,6458],{"type":39,"tag":249,"props":6445,"children":6446},{},[6447,6456],{"type":39,"tag":67,"props":6448,"children":6449},{},[6450],{"type":39,"tag":73,"props":6451,"children":6453},{"className":6452},[],[6454],{"type":44,"value":6455},"app_metadata.roles",{"type":44,"value":6457}," — Server-controlled. Only settable via the Netlify UI, admin API, or Identity event functions. Never let users set their own roles.",{"type":39,"tag":249,"props":6459,"children":6460},{},[6461,6470,6472,6478],{"type":39,"tag":67,"props":6462,"children":6463},{},[6464],{"type":39,"tag":73,"props":6465,"children":6467},{"className":6466},[],[6468],{"type":44,"value":6469},"user_metadata",{"type":44,"value":6471}," — User-controlled. Users can update via ",{"type":39,"tag":73,"props":6473,"children":6475},{"className":6474},[],[6476],{"type":44,"value":6477},"updateUser({ data: { ... } })",{"type":44,"value":904},{"type":39,"tag":238,"props":6480,"children":6482},{"id":6481},"role-based-redirects",[6483],{"type":44,"value":6484},"Role-Based Redirects",{"type":39,"tag":500,"props":6486,"children":6490},{"className":6487,"code":6488,"language":6489,"meta":508,"style":508},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# netlify.toml\n[[redirects]]\n  from = \"\u002Fadmin\u002F*\"\n  to = \"\u002Fadmin\u002F:splat\"\n  status = 200\n  conditions = { Role = [\"admin\"] }\n\n[[redirects]]\n  from = \"\u002Fadmin\u002F*\"\n  to = \"\u002F\"\n  status = 302\n","toml",[6491],{"type":39,"tag":73,"props":6492,"children":6493},{"__ignoreMap":508},[6494,6502,6510,6518,6526,6534,6542,6549,6556,6563,6571],{"type":39,"tag":666,"props":6495,"children":6496},{"class":668,"line":669},[6497],{"type":39,"tag":666,"props":6498,"children":6499},{},[6500],{"type":44,"value":6501},"# netlify.toml\n",{"type":39,"tag":666,"props":6503,"children":6504},{"class":668,"line":812},[6505],{"type":39,"tag":666,"props":6506,"children":6507},{},[6508],{"type":44,"value":6509},"[[redirects]]\n",{"type":39,"tag":666,"props":6511,"children":6512},{"class":668,"line":822},[6513],{"type":39,"tag":666,"props":6514,"children":6515},{},[6516],{"type":44,"value":6517},"  from = \"\u002Fadmin\u002F*\"\n",{"type":39,"tag":666,"props":6519,"children":6520},{"class":668,"line":893},[6521],{"type":39,"tag":666,"props":6522,"children":6523},{},[6524],{"type":44,"value":6525},"  to = \"\u002Fadmin\u002F:splat\"\n",{"type":39,"tag":666,"props":6527,"children":6528},{"class":668,"line":27},[6529],{"type":39,"tag":666,"props":6530,"children":6531},{},[6532],{"type":44,"value":6533},"  status = 200\n",{"type":39,"tag":666,"props":6535,"children":6536},{"class":668,"line":961},[6537],{"type":39,"tag":666,"props":6538,"children":6539},{},[6540],{"type":44,"value":6541},"  conditions = { Role = [\"admin\"] }\n",{"type":39,"tag":666,"props":6543,"children":6544},{"class":668,"line":971},[6545],{"type":39,"tag":666,"props":6546,"children":6547},{"emptyLinePlaceholder":816},[6548],{"type":44,"value":819},{"type":39,"tag":666,"props":6550,"children":6551},{"class":668,"line":1296},[6552],{"type":39,"tag":666,"props":6553,"children":6554},{},[6555],{"type":44,"value":6509},{"type":39,"tag":666,"props":6557,"children":6558},{"class":668,"line":1383},[6559],{"type":39,"tag":666,"props":6560,"children":6561},{},[6562],{"type":44,"value":6517},{"type":39,"tag":666,"props":6564,"children":6565},{"class":668,"line":1580},[6566],{"type":39,"tag":666,"props":6567,"children":6568},{},[6569],{"type":44,"value":6570},"  to = \"\u002F\"\n",{"type":39,"tag":666,"props":6572,"children":6573},{"class":668,"line":1927},[6574],{"type":39,"tag":666,"props":6575,"children":6576},{},[6577],{"type":44,"value":6578},"  status = 302\n",{"type":39,"tag":47,"props":6580,"children":6581},{},[6582,6584,6589],{"type":44,"value":6583},"Rules are evaluated top-to-bottom. The ",{"type":39,"tag":73,"props":6585,"children":6587},{"className":6586},[],[6588],{"type":44,"value":130},{"type":44,"value":6590}," cookie is read by the CDN to evaluate role conditions.",{"type":39,"tag":107,"props":6592,"children":6594},{"id":6593},"references",[6595],{"type":44,"value":6596},"References",{"type":39,"tag":245,"props":6598,"children":6599},{},[6600,6611],{"type":39,"tag":249,"props":6601,"children":6602},{},[6603,6609],{"type":39,"tag":53,"props":6604,"children":6606},{"href":6605},"references\u002Fadvanced-patterns.md",[6607],{"type":44,"value":6608},"Advanced patterns",{"type":44,"value":6610}," — password recovery, invite acceptance, email change, session hydration, SSR integration",{"type":39,"tag":249,"props":6612,"children":6613},{},[6614,6618],{"type":39,"tag":53,"props":6615,"children":6616},{"href":644},[6617],{"type":44,"value":647},{"type":44,"value":6619}," — where role gating is actually enforced (server-side vs client-side \u002F SPA navigation), admin operations being Functions-runtime-only, and why a role change doesn't apply until the JWT refreshes",{"type":39,"tag":6621,"props":6622,"children":6623},"style",{},[6624],{"type":44,"value":6625},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":6627,"total":2524},[6628,6646,6658,6674,6689,6704,6721,6738,6748,6763,6776,6791],{"slug":6629,"name":6629,"fn":6630,"description":6631,"org":6632,"tags":6633,"stars":5163,"repoUrl":6644,"updatedAt":6645},"configure-axis","configure AXIS agent evaluation scenarios","Author AXIS (Agent Experience Index Score) scenarios and axis.config.json for a project. Use when the user asks to set up AXIS, add a scenario, write or edit axis.config.json, or evaluate an AI agent with AXIS.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6634,6637,6640,6643],{"name":6635,"slug":6636,"type":15},"Agents","agents",{"name":6638,"slug":6639,"type":15},"Configuration","configuration",{"name":6641,"slug":6642,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Faxis","2026-07-20T05:59:47.468757",{"slug":6647,"name":6647,"fn":6648,"description":6649,"org":6650,"tags":6651,"stars":5163,"repoUrl":6644,"updatedAt":6657},"using-axis","run and interpret AXIS reports","Run AXIS, read its reports, navigate its project layout, and interpret scores. Use when the user asks to run AXIS, invoke the CLI, compare runs, explain a score, find a regression, manage baselines, or understand where AXIS writes its files.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6652,6655,6656],{"name":6653,"slug":6654,"type":15},"CLI","cli",{"name":6641,"slug":6642,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:40:13.443461",{"slug":191,"name":191,"fn":6659,"description":6660,"org":6661,"tags":6662,"stars":23,"repoUrl":24,"updatedAt":6673},"manage Netlify site access control","Use when the task involves controlling who can reach a Netlify site, or telling Netlify Identity apart from Secure Access. Trigger whenever the user wants to lock a site or deploy to their company\u002Fteam, restrict access to employees only, build an internal or employees-only app, set up password protection, SSO, or SAML, asks \"who can access my site\", or is confused about Netlify Identity vs Secure Access vs team login vs OAuth providers. Routes the request to the right layer — app-level Identity, site-visitor Password Protection, the Auth0 extension, or Team\u002FOrg SAML SSO — and explains the two-layer (perimeter + in-app identity) pattern and its double-login tradeoff. For building the app-level auth itself, use the netlify-identity skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6663,6666,6667,6670],{"name":6664,"slug":6665,"type":15},"Access Control","access-control",{"name":9,"slug":8,"type":15},{"name":6668,"slug":6669,"type":15},"Permissions","permissions",{"name":6671,"slug":6672,"type":15},"Security","security","2026-07-14T05:40:29.082149",{"slug":6675,"name":6675,"fn":6676,"description":6677,"org":6678,"tags":6679,"stars":23,"repoUrl":24,"updatedAt":6688},"netlify-agent-runner","run AI agent tasks on Netlify","Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from another model, or delegate development tasks to run remotely against their repo.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6680,6681,6684,6687],{"name":6635,"slug":6636,"type":15},{"name":6682,"slug":6683,"type":15},"Automation","automation",{"name":6685,"slug":6686,"type":15},"LLM","llm",{"name":9,"slug":8,"type":15},"2026-07-17T05:30:19.462913",{"slug":6690,"name":6690,"fn":6691,"description":6692,"org":6693,"tags":6694,"stars":23,"repoUrl":24,"updatedAt":6703},"netlify-ai-gateway","route AI requests via Netlify AI Gateway","Reference for Netlify AI Gateway — the managed proxy that routes calls to OpenAI, Anthropic, and Google Gemini SDKs without provider API keys. Use this skill any time the user wants to add AI on a Netlify site (chat, completion, reasoning, image generation, image-to-image edit\u002Fstylize), choose or change a model, wire up the OpenAI \u002F Anthropic \u002F @google\u002Fgenai SDK, decide which provider to use for an image-gen feature (it's Gemini-only on the gateway), or debug \"model not found\" \u002F \"API key missing\" against the gateway. Required reading before pinning a model — the gateway exposes a curated subset, not every provider model.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6695,6698,6701,6702],{"name":6696,"slug":6697,"type":15},"AI Infrastructure","ai-infrastructure",{"name":6699,"slug":6700,"type":15},"API Development","api-development",{"name":6685,"slug":6686,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:30:13.14555",{"slug":6705,"name":6705,"fn":6706,"description":6707,"org":6708,"tags":6709,"stars":23,"repoUrl":24,"updatedAt":6720},"netlify-blobs","manage file storage with Netlify Blobs","Guide for using Netlify Blobs for file and asset storage — images, documents, uploads, exports, cached binary artifacts. Covers getStore(), CRUD operations, metadata, listing, deploy-scoped vs site-scoped stores, and local development. Do NOT use Blobs as a dynamic data store — use Netlify Database for that.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6710,6713,6716,6717],{"name":6711,"slug":6712,"type":15},"Backend","backend",{"name":6714,"slug":6715,"type":15},"File Storage","file-storage",{"name":9,"slug":8,"type":15},{"name":6718,"slug":6719,"type":15},"Storage","storage","2026-07-17T05:30:16.503306",{"slug":6722,"name":6722,"fn":6723,"description":6724,"org":6725,"tags":6726,"stars":23,"repoUrl":24,"updatedAt":6737},"netlify-caching","configure CDN caching on Netlify","Guide for controlling caching on Netlify's CDN. Use when configuring cache headers, setting up stale-while-revalidate, implementing on-demand cache purge, or understanding Netlify's CDN caching behavior. Covers Cache-Control, Netlify-CDN-Cache-Control, cache tags, durable cache, and framework-specific caching patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6727,6730,6733,6734],{"name":6728,"slug":6729,"type":15},"Caching","caching",{"name":6731,"slug":6732,"type":15},"Deployment","deployment",{"name":9,"slug":8,"type":15},{"name":6735,"slug":6736,"type":15},"Performance","performance","2026-07-14T05:40:20.066717",{"slug":6739,"name":6739,"fn":6740,"description":6741,"org":6742,"tags":6743,"stars":23,"repoUrl":24,"updatedAt":6747},"netlify-config","configure Netlify site settings","Reference for netlify.toml configuration and site environment variables. Use when configuring build settings, redirects, rewrites, headers, deploy contexts, the `[dev]` block that controls `netlify dev` (command, port, targetPort, framework), or any site-level configuration — and when managing environment variables or secrets with the Netlify CLI, including scoping values to specific deploy contexts. Covers the complete netlify.toml syntax including redirects with splats\u002Fconditions, headers, deploy contexts, functions config, edge functions config, and the `[dev]` block (including when `framework` must be `\"#custom\"` — required when both a custom `command` and `targetPort` are set).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6744,6745,6746],{"name":6638,"slug":6639,"type":15},{"name":6731,"slug":6732,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:30:21.284801",{"slug":6749,"name":6749,"fn":6750,"description":6751,"org":6752,"tags":6753,"stars":23,"repoUrl":24,"updatedAt":6762},"netlify-database","provision and manage Netlify Database","Guide for using Netlify Database — the GA managed Postgres product built into Netlify. Use when a project needs any kind of dynamic, structured, or relational data. Covers provisioning via @netlify\u002Fdatabase, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file\u002Fasset storage — any dynamic data belongs in the database.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6754,6755,6758,6759],{"name":6711,"slug":6712,"type":15},{"name":6756,"slug":6757,"type":15},"Database","database",{"name":9,"slug":8,"type":15},{"name":6760,"slug":6761,"type":15},"PostgreSQL","postgresql","2026-07-20T05:58:58.934045",{"slug":6764,"name":6764,"fn":6765,"description":6766,"org":6767,"tags":6768,"stars":23,"repoUrl":24,"updatedAt":6775},"netlify-deploy","deploy and host projects on Netlify","Deploy, host, and publish web projects on Netlify with the Netlify CLI. Use when the user wants to deploy a site or repository to Netlify, link a local project to a Netlify site, ship a production or preview\u002Fdraft deploy, set up Git-based continuous deployment, run a manual or local deploy, configure CI deploys, or troubleshoot a failed or misconfigured deploy. Also use to view or tail a deployed site's runtime logs — function and edge-function output, deploy logs — via `netlify logs` when debugging what a live site is doing (recent errors, recent activity, streaming output).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6769,6770,6771,6772],{"name":6653,"slug":6654,"type":15},{"name":6731,"slug":6732,"type":15},{"name":9,"slug":8,"type":15},{"name":6773,"slug":6774,"type":15},"Web Development","web-development","2026-07-17T05:30:14.218977",{"slug":6777,"name":6777,"fn":6778,"description":6779,"org":6780,"tags":6781,"stars":23,"repoUrl":24,"updatedAt":6790},"netlify-edge-functions","write Netlify Edge Functions","Guide for writing Netlify Edge Functions. Use when building middleware, geolocation-based logic, request\u002Fresponse manipulation, authentication checks, A\u002FB testing, or any low-latency edge compute. Covers Deno runtime, context.next() middleware pattern, geolocation, and when to choose edge vs serverless.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6782,6785,6788,6789],{"name":6783,"slug":6784,"type":15},"Edge Functions","edge-functions",{"name":6786,"slug":6787,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},{"name":6735,"slug":6736,"type":15},"2026-07-14T05:40:34.147865",{"slug":6792,"name":6792,"fn":6793,"description":6794,"org":6795,"tags":6796,"stars":23,"repoUrl":24,"updatedAt":6805},"netlify-forms","handle HTML forms with Netlify","Guide for using Netlify Forms for HTML form handling. Use when adding contact forms, feedback forms, file upload forms, or any form that should be collected by Netlify. Covers the data-netlify attribute, spam filtering, AJAX submissions, file uploads, notifications, and the submissions API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6797,6800,6803,6804],{"name":6798,"slug":6799,"type":15},"Forms","forms",{"name":6801,"slug":6802,"type":15},"HTML","html",{"name":9,"slug":8,"type":15},{"name":6773,"slug":6774,"type":15},"2026-07-14T05:40:16.075367",{"items":6807,"total":2446},[6808,6815,6822,6829,6836,6843,6849],{"slug":191,"name":191,"fn":6659,"description":6660,"org":6809,"tags":6810,"stars":23,"repoUrl":24,"updatedAt":6673},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6811,6812,6813,6814],{"name":6664,"slug":6665,"type":15},{"name":9,"slug":8,"type":15},{"name":6668,"slug":6669,"type":15},{"name":6671,"slug":6672,"type":15},{"slug":6675,"name":6675,"fn":6676,"description":6677,"org":6816,"tags":6817,"stars":23,"repoUrl":24,"updatedAt":6688},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6818,6819,6820,6821],{"name":6635,"slug":6636,"type":15},{"name":6682,"slug":6683,"type":15},{"name":6685,"slug":6686,"type":15},{"name":9,"slug":8,"type":15},{"slug":6690,"name":6690,"fn":6691,"description":6692,"org":6823,"tags":6824,"stars":23,"repoUrl":24,"updatedAt":6703},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6825,6826,6827,6828],{"name":6696,"slug":6697,"type":15},{"name":6699,"slug":6700,"type":15},{"name":6685,"slug":6686,"type":15},{"name":9,"slug":8,"type":15},{"slug":6705,"name":6705,"fn":6706,"description":6707,"org":6830,"tags":6831,"stars":23,"repoUrl":24,"updatedAt":6720},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6832,6833,6834,6835],{"name":6711,"slug":6712,"type":15},{"name":6714,"slug":6715,"type":15},{"name":9,"slug":8,"type":15},{"name":6718,"slug":6719,"type":15},{"slug":6722,"name":6722,"fn":6723,"description":6724,"org":6837,"tags":6838,"stars":23,"repoUrl":24,"updatedAt":6737},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6839,6840,6841,6842],{"name":6728,"slug":6729,"type":15},{"name":6731,"slug":6732,"type":15},{"name":9,"slug":8,"type":15},{"name":6735,"slug":6736,"type":15},{"slug":6739,"name":6739,"fn":6740,"description":6741,"org":6844,"tags":6845,"stars":23,"repoUrl":24,"updatedAt":6747},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6846,6847,6848],{"name":6638,"slug":6639,"type":15},{"name":6731,"slug":6732,"type":15},{"name":9,"slug":8,"type":15},{"slug":6749,"name":6749,"fn":6750,"description":6751,"org":6850,"tags":6851,"stars":23,"repoUrl":24,"updatedAt":6762},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6852,6853,6854,6855],{"name":6711,"slug":6712,"type":15},{"name":6756,"slug":6757,"type":15},{"name":9,"slug":8,"type":15},{"name":6760,"slug":6761,"type":15}]