[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-netlify-identity":3,"mdc-o413s4-key":36,"related-repo-openai-netlify-identity":5472,"related-org-openai-netlify-identity":5591},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"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`. Never use `netlify-identity-widget` or `gotrue-js` — they are deprecated.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Netlify","netlify","tag",{"name":17,"slug":18,"type":15},"Authentication","authentication",{"name":20,"slug":21,"type":15},"Access Control","access-control",{"name":23,"slug":24,"type":15},"Serverless","serverless",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-09T04:58:34.859924",null,465,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fnetlify\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`. Never use `netlify-identity-widget` or `gotrue-js` — they are deprecated.\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`.** Never use `netlify-identity-widget` or `gotrue-js` — they are deprecated. `@netlify\u002Fidentity` provides a unified, headless TypeScript API that works in both browser and server contexts (Netlify Functions, Edge Functions, SSR frameworks).\n\n## Setup\n\n```bash\nnpm install @netlify\u002Fidentity\n```\n\nIdentity is automatically enabled when a deploy created by a Netlify Agent Runner session includes Identity code. Otherwise, it must be manually enabled in the UI. These are the default settings:\n\n- **Registration** — Open (anyone can sign up). Change to Invite only in **Project configuration > Identity** if needed.\n- **Autoconfirm** — Off (new signups require email confirmation). Enable in **Project configuration > Identity** to skip confirmation during development.\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## 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      showError(error.status === 401 ? '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\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\nEnable providers in **Project configuration > Identity > External providers** before using OAuth.\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\nFetch the project's Identity settings to conditionally render signup forms and OAuth buttons.\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| 401 | Invalid credentials or expired token |\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\n## Identity Event Functions\n\nSpecial serverless functions that trigger on Identity lifecycle events. These use the **legacy named `handler` export** (not the modern default export).\n\n**Event names:** `identity-validate`, `identity-signup`, `identity-login`\n\n```typescript\n\u002F\u002F netlify\u002Ffunctions\u002Fidentity-signup.mts\nimport type { Handler, HandlerEvent, HandlerContext } from '@netlify\u002Ffunctions'\n\nconst handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {\n  const { user } = JSON.parse(event.body || '{}')\n\n  return {\n    statusCode: 200,\n    body: JSON.stringify({\n      app_metadata: {\n        ...user.app_metadata,\n        roles: ['member'],\n      },\n    }),\n  }\n}\n\nexport { handler }\n```\n\nThe response body replaces `app_metadata` and\u002For `user_metadata` on the user record — include all fields you want to keep.\n\n## Roles and Authorization\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## Bundled References (Load As Needed)\n\n- [Advanced patterns](references\u002Fadvanced-patterns.md) — password recovery, invite acceptance, email change, session hydration, SSR integration\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,49,66,109,116,150,155,193,200,228,234,239,492,497,883,889,894,1034,1040,1441,1447,1460,1953,1959,2025,2031,2052,2235,2247,2253,2265,2912,2918,3464,3470,3475,3750,3756,4591,4597,4607,4659,4691,4771,4777,4797,4828,5270,5290,5296,5333,5339,5433,5446,5452,5466],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","Netlify Identity",{"type":42,"tag":50,"props":51,"children":52},"p",{},[53,55,64],{"type":47,"value":54},"Netlify Identity is a user management service for signups, logins, password recovery, user metadata, and role-based access control. It is built on ",{"type":42,"tag":56,"props":57,"children":61},"a",{"href":58,"rel":59},"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fgotrue",[60],"nofollow",[62],{"type":47,"value":63},"GoTrue",{"type":47,"value":65}," and issues JSON Web Tokens (JWTs).",{"type":42,"tag":50,"props":67,"children":68},{},[69,84,86,92,94,100,102,107],{"type":42,"tag":70,"props":71,"children":72},"strong",{},[73,75,82],{"type":47,"value":74},"Always use ",{"type":42,"tag":76,"props":77,"children":79},"code",{"className":78},[],[80],{"type":47,"value":81},"@netlify\u002Fidentity",{"type":47,"value":83},".",{"type":47,"value":85}," Never use ",{"type":42,"tag":76,"props":87,"children":89},{"className":88},[],[90],{"type":47,"value":91},"netlify-identity-widget",{"type":47,"value":93}," or ",{"type":42,"tag":76,"props":95,"children":97},{"className":96},[],[98],{"type":47,"value":99},"gotrue-js",{"type":47,"value":101}," — they are deprecated. ",{"type":42,"tag":76,"props":103,"children":105},{"className":104},[],[106],{"type":47,"value":81},{"type":47,"value":108}," provides a unified, headless TypeScript API that works in both browser and server contexts (Netlify Functions, Edge Functions, SSR frameworks).",{"type":42,"tag":110,"props":111,"children":113},"h2",{"id":112},"setup",[114],{"type":47,"value":115},"Setup",{"type":42,"tag":117,"props":118,"children":123},"pre",{"className":119,"code":120,"language":121,"meta":122,"style":122},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @netlify\u002Fidentity\n","bash","",[124],{"type":42,"tag":76,"props":125,"children":126},{"__ignoreMap":122},[127],{"type":42,"tag":128,"props":129,"children":132},"span",{"class":130,"line":131},"line",1,[133,139,145],{"type":42,"tag":128,"props":134,"children":136},{"style":135},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[137],{"type":47,"value":138},"npm",{"type":42,"tag":128,"props":140,"children":142},{"style":141},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[143],{"type":47,"value":144}," install",{"type":42,"tag":128,"props":146,"children":147},{"style":141},[148],{"type":47,"value":149}," @netlify\u002Fidentity\n",{"type":42,"tag":50,"props":151,"children":152},{},[153],{"type":47,"value":154},"Identity is automatically enabled when a deploy created by a Netlify Agent Runner session includes Identity code. Otherwise, it must be manually enabled in the UI. These are the default settings:",{"type":42,"tag":156,"props":157,"children":158},"ul",{},[159,177],{"type":42,"tag":160,"props":161,"children":162},"li",{},[163,168,170,175],{"type":42,"tag":70,"props":164,"children":165},{},[166],{"type":47,"value":167},"Registration",{"type":47,"value":169}," — Open (anyone can sign up). Change to Invite only in ",{"type":42,"tag":70,"props":171,"children":172},{},[173],{"type":47,"value":174},"Project configuration > Identity",{"type":47,"value":176}," if needed.",{"type":42,"tag":160,"props":178,"children":179},{},[180,185,187,191],{"type":42,"tag":70,"props":181,"children":182},{},[183],{"type":47,"value":184},"Autoconfirm",{"type":47,"value":186}," — Off (new signups require email confirmation). Enable in ",{"type":42,"tag":70,"props":188,"children":189},{},[190],{"type":47,"value":174},{"type":47,"value":192}," to skip confirmation during development.",{"type":42,"tag":194,"props":195,"children":197},"h3",{"id":196},"local-development",[198],{"type":47,"value":199},"Local Development",{"type":42,"tag":50,"props":201,"children":202},{},[203,205,210,212,218,220,226],{"type":47,"value":204},"Identity does ",{"type":42,"tag":70,"props":206,"children":207},{},[208],{"type":47,"value":209},"not",{"type":47,"value":211}," currently work with ",{"type":42,"tag":76,"props":213,"children":215},{"className":214},[],[216],{"type":47,"value":217},"netlify dev",{"type":47,"value":219},". You must deploy to Netlify to test Identity features. Use ",{"type":42,"tag":76,"props":221,"children":223},{"className":222},[],[224],{"type":47,"value":225},"npx netlify deploy",{"type":47,"value":227}," for preview deploys during development. This limitation may be resolved in a future release.",{"type":42,"tag":110,"props":229,"children":231},{"id":230},"quick-start",[232],{"type":47,"value":233},"Quick Start",{"type":42,"tag":50,"props":235,"children":236},{},[237],{"type":47,"value":238},"Log in from the browser:",{"type":42,"tag":117,"props":240,"children":244},{"className":241,"code":242,"language":243,"meta":122,"style":122},"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",[245],{"type":42,"tag":76,"props":246,"children":247},{"__ignoreMap":122},[248,303,313,384,444,452,462],{"type":42,"tag":128,"props":249,"children":250},{"class":130,"line":131},[251,257,263,269,274,279,284,289,294,298],{"type":42,"tag":128,"props":252,"children":254},{"style":253},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[255],{"type":47,"value":256},"import",{"type":42,"tag":128,"props":258,"children":260},{"style":259},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[261],{"type":47,"value":262}," {",{"type":42,"tag":128,"props":264,"children":266},{"style":265},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[267],{"type":47,"value":268}," login",{"type":42,"tag":128,"props":270,"children":271},{"style":259},[272],{"type":47,"value":273},",",{"type":42,"tag":128,"props":275,"children":276},{"style":265},[277],{"type":47,"value":278}," getUser",{"type":42,"tag":128,"props":280,"children":281},{"style":259},[282],{"type":47,"value":283}," }",{"type":42,"tag":128,"props":285,"children":286},{"style":253},[287],{"type":47,"value":288}," from",{"type":42,"tag":128,"props":290,"children":291},{"style":259},[292],{"type":47,"value":293}," '",{"type":42,"tag":128,"props":295,"children":296},{"style":141},[297],{"type":47,"value":81},{"type":42,"tag":128,"props":299,"children":300},{"style":259},[301],{"type":47,"value":302},"'\n",{"type":42,"tag":128,"props":304,"children":306},{"class":130,"line":305},2,[307],{"type":42,"tag":128,"props":308,"children":310},{"emptyLinePlaceholder":309},true,[311],{"type":47,"value":312},"\n",{"type":42,"tag":128,"props":314,"children":316},{"class":130,"line":315},3,[317,323,328,333,338,343,348,353,358,362,366,370,375,379],{"type":42,"tag":128,"props":318,"children":320},{"style":319},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[321],{"type":47,"value":322},"const",{"type":42,"tag":128,"props":324,"children":325},{"style":265},[326],{"type":47,"value":327}," user ",{"type":42,"tag":128,"props":329,"children":330},{"style":259},[331],{"type":47,"value":332},"=",{"type":42,"tag":128,"props":334,"children":335},{"style":253},[336],{"type":47,"value":337}," await",{"type":42,"tag":128,"props":339,"children":341},{"style":340},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[342],{"type":47,"value":268},{"type":42,"tag":128,"props":344,"children":345},{"style":265},[346],{"type":47,"value":347},"(",{"type":42,"tag":128,"props":349,"children":350},{"style":259},[351],{"type":47,"value":352},"'",{"type":42,"tag":128,"props":354,"children":355},{"style":141},[356],{"type":47,"value":357},"user@example.com",{"type":42,"tag":128,"props":359,"children":360},{"style":259},[361],{"type":47,"value":352},{"type":42,"tag":128,"props":363,"children":364},{"style":259},[365],{"type":47,"value":273},{"type":42,"tag":128,"props":367,"children":368},{"style":259},[369],{"type":47,"value":293},{"type":42,"tag":128,"props":371,"children":372},{"style":141},[373],{"type":47,"value":374},"\u003Cpassword>",{"type":42,"tag":128,"props":376,"children":377},{"style":259},[378],{"type":47,"value":352},{"type":42,"tag":128,"props":380,"children":381},{"style":265},[382],{"type":47,"value":383},")\n",{"type":42,"tag":128,"props":385,"children":387},{"class":130,"line":386},4,[388,393,397,402,406,411,416,421,426,430,435,440],{"type":42,"tag":128,"props":389,"children":390},{"style":265},[391],{"type":47,"value":392},"console",{"type":42,"tag":128,"props":394,"children":395},{"style":259},[396],{"type":47,"value":83},{"type":42,"tag":128,"props":398,"children":399},{"style":340},[400],{"type":47,"value":401},"log",{"type":42,"tag":128,"props":403,"children":404},{"style":265},[405],{"type":47,"value":347},{"type":42,"tag":128,"props":407,"children":408},{"style":259},[409],{"type":47,"value":410},"`",{"type":42,"tag":128,"props":412,"children":413},{"style":141},[414],{"type":47,"value":415},"Hello, ",{"type":42,"tag":128,"props":417,"children":418},{"style":259},[419],{"type":47,"value":420},"${",{"type":42,"tag":128,"props":422,"children":423},{"style":265},[424],{"type":47,"value":425},"user",{"type":42,"tag":128,"props":427,"children":428},{"style":259},[429],{"type":47,"value":83},{"type":42,"tag":128,"props":431,"children":432},{"style":265},[433],{"type":47,"value":434},"name",{"type":42,"tag":128,"props":436,"children":437},{"style":259},[438],{"type":47,"value":439},"}`",{"type":42,"tag":128,"props":441,"children":442},{"style":265},[443],{"type":47,"value":383},{"type":42,"tag":128,"props":445,"children":447},{"class":130,"line":446},5,[448],{"type":42,"tag":128,"props":449,"children":450},{"emptyLinePlaceholder":309},[451],{"type":47,"value":312},{"type":42,"tag":128,"props":453,"children":455},{"class":130,"line":454},6,[456],{"type":42,"tag":128,"props":457,"children":459},{"style":458},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[460],{"type":47,"value":461},"\u002F\u002F Later, check auth state\n",{"type":42,"tag":128,"props":463,"children":465},{"class":130,"line":464},7,[466,470,475,479,483,487],{"type":42,"tag":128,"props":467,"children":468},{"style":319},[469],{"type":47,"value":322},{"type":42,"tag":128,"props":471,"children":472},{"style":265},[473],{"type":47,"value":474}," currentUser ",{"type":42,"tag":128,"props":476,"children":477},{"style":259},[478],{"type":47,"value":332},{"type":42,"tag":128,"props":480,"children":481},{"style":253},[482],{"type":47,"value":337},{"type":42,"tag":128,"props":484,"children":485},{"style":340},[486],{"type":47,"value":278},{"type":42,"tag":128,"props":488,"children":489},{"style":265},[490],{"type":47,"value":491},"()\n",{"type":42,"tag":50,"props":493,"children":494},{},[495],{"type":47,"value":496},"Protect a Netlify Function:",{"type":42,"tag":117,"props":498,"children":500},{"className":241,"code":499,"language":243,"meta":122,"style":122},"\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",[501],{"type":42,"tag":76,"props":502,"children":503},{"__ignoreMap":122},[504,512,547,589,596,667,698,787,874],{"type":42,"tag":128,"props":505,"children":506},{"class":130,"line":131},[507],{"type":42,"tag":128,"props":508,"children":509},{"style":458},[510],{"type":47,"value":511},"\u002F\u002F netlify\u002Ffunctions\u002Fprotected.mts\n",{"type":42,"tag":128,"props":513,"children":514},{"class":130,"line":305},[515,519,523,527,531,535,539,543],{"type":42,"tag":128,"props":516,"children":517},{"style":253},[518],{"type":47,"value":256},{"type":42,"tag":128,"props":520,"children":521},{"style":259},[522],{"type":47,"value":262},{"type":42,"tag":128,"props":524,"children":525},{"style":265},[526],{"type":47,"value":278},{"type":42,"tag":128,"props":528,"children":529},{"style":259},[530],{"type":47,"value":283},{"type":42,"tag":128,"props":532,"children":533},{"style":253},[534],{"type":47,"value":288},{"type":42,"tag":128,"props":536,"children":537},{"style":259},[538],{"type":47,"value":293},{"type":42,"tag":128,"props":540,"children":541},{"style":141},[542],{"type":47,"value":81},{"type":42,"tag":128,"props":544,"children":545},{"style":259},[546],{"type":47,"value":302},{"type":42,"tag":128,"props":548,"children":549},{"class":130,"line":315},[550,554,559,563,568,572,576,580,585],{"type":42,"tag":128,"props":551,"children":552},{"style":253},[553],{"type":47,"value":256},{"type":42,"tag":128,"props":555,"children":556},{"style":253},[557],{"type":47,"value":558}," type",{"type":42,"tag":128,"props":560,"children":561},{"style":259},[562],{"type":47,"value":262},{"type":42,"tag":128,"props":564,"children":565},{"style":265},[566],{"type":47,"value":567}," Context",{"type":42,"tag":128,"props":569,"children":570},{"style":259},[571],{"type":47,"value":283},{"type":42,"tag":128,"props":573,"children":574},{"style":253},[575],{"type":47,"value":288},{"type":42,"tag":128,"props":577,"children":578},{"style":259},[579],{"type":47,"value":293},{"type":42,"tag":128,"props":581,"children":582},{"style":141},[583],{"type":47,"value":584},"@netlify\u002Ffunctions",{"type":42,"tag":128,"props":586,"children":587},{"style":259},[588],{"type":47,"value":302},{"type":42,"tag":128,"props":590,"children":591},{"class":130,"line":386},[592],{"type":42,"tag":128,"props":593,"children":594},{"emptyLinePlaceholder":309},[595],{"type":47,"value":312},{"type":42,"tag":128,"props":597,"children":598},{"class":130,"line":446},[599,604,609,614,619,625,630,635,639,644,648,652,657,662],{"type":42,"tag":128,"props":600,"children":601},{"style":253},[602],{"type":47,"value":603},"export",{"type":42,"tag":128,"props":605,"children":606},{"style":253},[607],{"type":47,"value":608}," default",{"type":42,"tag":128,"props":610,"children":611},{"style":319},[612],{"type":47,"value":613}," async",{"type":42,"tag":128,"props":615,"children":616},{"style":259},[617],{"type":47,"value":618}," (",{"type":42,"tag":128,"props":620,"children":622},{"style":621},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[623],{"type":47,"value":624},"req",{"type":42,"tag":128,"props":626,"children":627},{"style":259},[628],{"type":47,"value":629},":",{"type":42,"tag":128,"props":631,"children":632},{"style":135},[633],{"type":47,"value":634}," Request",{"type":42,"tag":128,"props":636,"children":637},{"style":259},[638],{"type":47,"value":273},{"type":42,"tag":128,"props":640,"children":641},{"style":621},[642],{"type":47,"value":643}," context",{"type":42,"tag":128,"props":645,"children":646},{"style":259},[647],{"type":47,"value":629},{"type":42,"tag":128,"props":649,"children":650},{"style":135},[651],{"type":47,"value":567},{"type":42,"tag":128,"props":653,"children":654},{"style":259},[655],{"type":47,"value":656},")",{"type":42,"tag":128,"props":658,"children":659},{"style":319},[660],{"type":47,"value":661}," =>",{"type":42,"tag":128,"props":663,"children":664},{"style":259},[665],{"type":47,"value":666}," {\n",{"type":42,"tag":128,"props":668,"children":669},{"class":130,"line":454},[670,675,680,685,689,693],{"type":42,"tag":128,"props":671,"children":672},{"style":319},[673],{"type":47,"value":674},"  const",{"type":42,"tag":128,"props":676,"children":677},{"style":265},[678],{"type":47,"value":679}," user",{"type":42,"tag":128,"props":681,"children":682},{"style":259},[683],{"type":47,"value":684}," =",{"type":42,"tag":128,"props":686,"children":687},{"style":253},[688],{"type":47,"value":337},{"type":42,"tag":128,"props":690,"children":691},{"style":340},[692],{"type":47,"value":278},{"type":42,"tag":128,"props":694,"children":696},{"style":695},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[697],{"type":47,"value":491},{"type":42,"tag":128,"props":699,"children":700},{"class":130,"line":464},[701,706,710,715,719,724,729,734,739,743,747,752,756,760,764,769,773,779,783],{"type":42,"tag":128,"props":702,"children":703},{"style":253},[704],{"type":47,"value":705},"  if",{"type":42,"tag":128,"props":707,"children":708},{"style":695},[709],{"type":47,"value":618},{"type":42,"tag":128,"props":711,"children":712},{"style":259},[713],{"type":47,"value":714},"!",{"type":42,"tag":128,"props":716,"children":717},{"style":265},[718],{"type":47,"value":425},{"type":42,"tag":128,"props":720,"children":721},{"style":695},[722],{"type":47,"value":723},") ",{"type":42,"tag":128,"props":725,"children":726},{"style":253},[727],{"type":47,"value":728},"return",{"type":42,"tag":128,"props":730,"children":731},{"style":259},[732],{"type":47,"value":733}," new",{"type":42,"tag":128,"props":735,"children":736},{"style":340},[737],{"type":47,"value":738}," Response",{"type":42,"tag":128,"props":740,"children":741},{"style":695},[742],{"type":47,"value":347},{"type":42,"tag":128,"props":744,"children":745},{"style":259},[746],{"type":47,"value":352},{"type":42,"tag":128,"props":748,"children":749},{"style":141},[750],{"type":47,"value":751},"Unauthorized",{"type":42,"tag":128,"props":753,"children":754},{"style":259},[755],{"type":47,"value":352},{"type":42,"tag":128,"props":757,"children":758},{"style":259},[759],{"type":47,"value":273},{"type":42,"tag":128,"props":761,"children":762},{"style":259},[763],{"type":47,"value":262},{"type":42,"tag":128,"props":765,"children":766},{"style":695},[767],{"type":47,"value":768}," status",{"type":42,"tag":128,"props":770,"children":771},{"style":259},[772],{"type":47,"value":629},{"type":42,"tag":128,"props":774,"children":776},{"style":775},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[777],{"type":47,"value":778}," 401",{"type":42,"tag":128,"props":780,"children":781},{"style":259},[782],{"type":47,"value":283},{"type":42,"tag":128,"props":784,"children":785},{"style":695},[786],{"type":47,"value":383},{"type":42,"tag":128,"props":788,"children":790},{"class":130,"line":789},8,[791,796,800,804,809,813,818,823,827,831,835,840,844,849,853,857,861,866,870],{"type":42,"tag":128,"props":792,"children":793},{"style":253},[794],{"type":47,"value":795},"  return",{"type":42,"tag":128,"props":797,"children":798},{"style":265},[799],{"type":47,"value":738},{"type":42,"tag":128,"props":801,"children":802},{"style":259},[803],{"type":47,"value":83},{"type":42,"tag":128,"props":805,"children":806},{"style":340},[807],{"type":47,"value":808},"json",{"type":42,"tag":128,"props":810,"children":811},{"style":695},[812],{"type":47,"value":347},{"type":42,"tag":128,"props":814,"children":815},{"style":259},[816],{"type":47,"value":817},"{",{"type":42,"tag":128,"props":819,"children":820},{"style":695},[821],{"type":47,"value":822}," id",{"type":42,"tag":128,"props":824,"children":825},{"style":259},[826],{"type":47,"value":629},{"type":42,"tag":128,"props":828,"children":829},{"style":265},[830],{"type":47,"value":679},{"type":42,"tag":128,"props":832,"children":833},{"style":259},[834],{"type":47,"value":83},{"type":42,"tag":128,"props":836,"children":837},{"style":265},[838],{"type":47,"value":839},"id",{"type":42,"tag":128,"props":841,"children":842},{"style":259},[843],{"type":47,"value":273},{"type":42,"tag":128,"props":845,"children":846},{"style":695},[847],{"type":47,"value":848}," email",{"type":42,"tag":128,"props":850,"children":851},{"style":259},[852],{"type":47,"value":629},{"type":42,"tag":128,"props":854,"children":855},{"style":265},[856],{"type":47,"value":679},{"type":42,"tag":128,"props":858,"children":859},{"style":259},[860],{"type":47,"value":83},{"type":42,"tag":128,"props":862,"children":863},{"style":265},[864],{"type":47,"value":865},"email",{"type":42,"tag":128,"props":867,"children":868},{"style":259},[869],{"type":47,"value":283},{"type":42,"tag":128,"props":871,"children":872},{"style":695},[873],{"type":47,"value":383},{"type":42,"tag":128,"props":875,"children":877},{"class":130,"line":876},9,[878],{"type":42,"tag":128,"props":879,"children":880},{"style":259},[881],{"type":47,"value":882},"}\n",{"type":42,"tag":110,"props":884,"children":886},{"id":885},"core-api",[887],{"type":47,"value":888},"Core API",{"type":42,"tag":50,"props":890,"children":891},{},[892],{"type":47,"value":893},"Import and use headless functions directly:",{"type":42,"tag":117,"props":895,"children":897},{"className":241,"code":896,"language":243,"meta":122,"style":122},"import {\n  getUser,\n  handleAuthCallback,\n  login,\n  logout,\n  signup,\n  oauthLogin,\n  onAuthChange,\n  getSettings,\n} from '@netlify\u002Fidentity'\n",[898],{"type":42,"tag":76,"props":899,"children":900},{"__ignoreMap":122},[901,912,925,937,949,961,973,985,997,1009],{"type":42,"tag":128,"props":902,"children":903},{"class":130,"line":131},[904,908],{"type":42,"tag":128,"props":905,"children":906},{"style":253},[907],{"type":47,"value":256},{"type":42,"tag":128,"props":909,"children":910},{"style":259},[911],{"type":47,"value":666},{"type":42,"tag":128,"props":913,"children":914},{"class":130,"line":305},[915,920],{"type":42,"tag":128,"props":916,"children":917},{"style":265},[918],{"type":47,"value":919},"  getUser",{"type":42,"tag":128,"props":921,"children":922},{"style":259},[923],{"type":47,"value":924},",\n",{"type":42,"tag":128,"props":926,"children":927},{"class":130,"line":315},[928,933],{"type":42,"tag":128,"props":929,"children":930},{"style":265},[931],{"type":47,"value":932},"  handleAuthCallback",{"type":42,"tag":128,"props":934,"children":935},{"style":259},[936],{"type":47,"value":924},{"type":42,"tag":128,"props":938,"children":939},{"class":130,"line":386},[940,945],{"type":42,"tag":128,"props":941,"children":942},{"style":265},[943],{"type":47,"value":944},"  login",{"type":42,"tag":128,"props":946,"children":947},{"style":259},[948],{"type":47,"value":924},{"type":42,"tag":128,"props":950,"children":951},{"class":130,"line":446},[952,957],{"type":42,"tag":128,"props":953,"children":954},{"style":265},[955],{"type":47,"value":956},"  logout",{"type":42,"tag":128,"props":958,"children":959},{"style":259},[960],{"type":47,"value":924},{"type":42,"tag":128,"props":962,"children":963},{"class":130,"line":454},[964,969],{"type":42,"tag":128,"props":965,"children":966},{"style":265},[967],{"type":47,"value":968},"  signup",{"type":42,"tag":128,"props":970,"children":971},{"style":259},[972],{"type":47,"value":924},{"type":42,"tag":128,"props":974,"children":975},{"class":130,"line":464},[976,981],{"type":42,"tag":128,"props":977,"children":978},{"style":265},[979],{"type":47,"value":980},"  oauthLogin",{"type":42,"tag":128,"props":982,"children":983},{"style":259},[984],{"type":47,"value":924},{"type":42,"tag":128,"props":986,"children":987},{"class":130,"line":789},[988,993],{"type":42,"tag":128,"props":989,"children":990},{"style":265},[991],{"type":47,"value":992},"  onAuthChange",{"type":42,"tag":128,"props":994,"children":995},{"style":259},[996],{"type":47,"value":924},{"type":42,"tag":128,"props":998,"children":999},{"class":130,"line":876},[1000,1005],{"type":42,"tag":128,"props":1001,"children":1002},{"style":265},[1003],{"type":47,"value":1004},"  getSettings",{"type":42,"tag":128,"props":1006,"children":1007},{"style":259},[1008],{"type":47,"value":924},{"type":42,"tag":128,"props":1010,"children":1012},{"class":130,"line":1011},10,[1013,1018,1022,1026,1030],{"type":42,"tag":128,"props":1014,"children":1015},{"style":259},[1016],{"type":47,"value":1017},"}",{"type":42,"tag":128,"props":1019,"children":1020},{"style":253},[1021],{"type":47,"value":288},{"type":42,"tag":128,"props":1023,"children":1024},{"style":259},[1025],{"type":47,"value":293},{"type":42,"tag":128,"props":1027,"children":1028},{"style":141},[1029],{"type":47,"value":81},{"type":42,"tag":128,"props":1031,"children":1032},{"style":259},[1033],{"type":47,"value":302},{"type":42,"tag":194,"props":1035,"children":1037},{"id":1036},"login",[1038],{"type":47,"value":1039},"Login",{"type":42,"tag":117,"props":1041,"children":1043},{"className":241,"code":1042,"language":243,"meta":122,"style":122},"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      showError(error.status === 401 ? 'Invalid email or password.' : error.message)\n    }\n  }\n}\n",[1044],{"type":42,"tag":76,"props":1045,"children":1046},{"__ignoreMap":122},[1047,1091,1098,1158,1170,1214,1277,1308,1341,1416,1424,1433],{"type":42,"tag":128,"props":1048,"children":1049},{"class":130,"line":131},[1050,1054,1058,1062,1066,1071,1075,1079,1083,1087],{"type":42,"tag":128,"props":1051,"children":1052},{"style":253},[1053],{"type":47,"value":256},{"type":42,"tag":128,"props":1055,"children":1056},{"style":259},[1057],{"type":47,"value":262},{"type":42,"tag":128,"props":1059,"children":1060},{"style":265},[1061],{"type":47,"value":268},{"type":42,"tag":128,"props":1063,"children":1064},{"style":259},[1065],{"type":47,"value":273},{"type":42,"tag":128,"props":1067,"children":1068},{"style":265},[1069],{"type":47,"value":1070}," AuthError",{"type":42,"tag":128,"props":1072,"children":1073},{"style":259},[1074],{"type":47,"value":283},{"type":42,"tag":128,"props":1076,"children":1077},{"style":253},[1078],{"type":47,"value":288},{"type":42,"tag":128,"props":1080,"children":1081},{"style":259},[1082],{"type":47,"value":293},{"type":42,"tag":128,"props":1084,"children":1085},{"style":141},[1086],{"type":47,"value":81},{"type":42,"tag":128,"props":1088,"children":1089},{"style":259},[1090],{"type":47,"value":302},{"type":42,"tag":128,"props":1092,"children":1093},{"class":130,"line":305},[1094],{"type":42,"tag":128,"props":1095,"children":1096},{"emptyLinePlaceholder":309},[1097],{"type":47,"value":312},{"type":42,"tag":128,"props":1099,"children":1100},{"class":130,"line":315},[1101,1106,1111,1116,1120,1124,1128,1133,1137,1142,1146,1150,1154],{"type":42,"tag":128,"props":1102,"children":1103},{"style":319},[1104],{"type":47,"value":1105},"async",{"type":42,"tag":128,"props":1107,"children":1108},{"style":319},[1109],{"type":47,"value":1110}," function",{"type":42,"tag":128,"props":1112,"children":1113},{"style":340},[1114],{"type":47,"value":1115}," handleLogin",{"type":42,"tag":128,"props":1117,"children":1118},{"style":259},[1119],{"type":47,"value":347},{"type":42,"tag":128,"props":1121,"children":1122},{"style":621},[1123],{"type":47,"value":865},{"type":42,"tag":128,"props":1125,"children":1126},{"style":259},[1127],{"type":47,"value":629},{"type":42,"tag":128,"props":1129,"children":1130},{"style":135},[1131],{"type":47,"value":1132}," string",{"type":42,"tag":128,"props":1134,"children":1135},{"style":259},[1136],{"type":47,"value":273},{"type":42,"tag":128,"props":1138,"children":1139},{"style":621},[1140],{"type":47,"value":1141}," password",{"type":42,"tag":128,"props":1143,"children":1144},{"style":259},[1145],{"type":47,"value":629},{"type":42,"tag":128,"props":1147,"children":1148},{"style":135},[1149],{"type":47,"value":1132},{"type":42,"tag":128,"props":1151,"children":1152},{"style":259},[1153],{"type":47,"value":656},{"type":42,"tag":128,"props":1155,"children":1156},{"style":259},[1157],{"type":47,"value":666},{"type":42,"tag":128,"props":1159,"children":1160},{"class":130,"line":386},[1161,1166],{"type":42,"tag":128,"props":1162,"children":1163},{"style":253},[1164],{"type":47,"value":1165},"  try",{"type":42,"tag":128,"props":1167,"children":1168},{"style":259},[1169],{"type":47,"value":666},{"type":42,"tag":128,"props":1171,"children":1172},{"class":130,"line":446},[1173,1178,1182,1186,1190,1194,1198,1202,1206,1210],{"type":42,"tag":128,"props":1174,"children":1175},{"style":319},[1176],{"type":47,"value":1177},"    const",{"type":42,"tag":128,"props":1179,"children":1180},{"style":265},[1181],{"type":47,"value":679},{"type":42,"tag":128,"props":1183,"children":1184},{"style":259},[1185],{"type":47,"value":684},{"type":42,"tag":128,"props":1187,"children":1188},{"style":253},[1189],{"type":47,"value":337},{"type":42,"tag":128,"props":1191,"children":1192},{"style":340},[1193],{"type":47,"value":268},{"type":42,"tag":128,"props":1195,"children":1196},{"style":695},[1197],{"type":47,"value":347},{"type":42,"tag":128,"props":1199,"children":1200},{"style":265},[1201],{"type":47,"value":865},{"type":42,"tag":128,"props":1203,"children":1204},{"style":259},[1205],{"type":47,"value":273},{"type":42,"tag":128,"props":1207,"children":1208},{"style":265},[1209],{"type":47,"value":1141},{"type":42,"tag":128,"props":1211,"children":1212},{"style":695},[1213],{"type":47,"value":383},{"type":42,"tag":128,"props":1215,"children":1216},{"class":130,"line":454},[1217,1222,1226,1230,1235,1239,1243,1247,1252,1257,1261,1265,1269,1273],{"type":42,"tag":128,"props":1218,"children":1219},{"style":340},[1220],{"type":47,"value":1221},"    showSuccess",{"type":42,"tag":128,"props":1223,"children":1224},{"style":695},[1225],{"type":47,"value":347},{"type":42,"tag":128,"props":1227,"children":1228},{"style":259},[1229],{"type":47,"value":410},{"type":42,"tag":128,"props":1231,"children":1232},{"style":141},[1233],{"type":47,"value":1234},"Welcome back, ",{"type":42,"tag":128,"props":1236,"children":1237},{"style":259},[1238],{"type":47,"value":420},{"type":42,"tag":128,"props":1240,"children":1241},{"style":265},[1242],{"type":47,"value":425},{"type":42,"tag":128,"props":1244,"children":1245},{"style":259},[1246],{"type":47,"value":83},{"type":42,"tag":128,"props":1248,"children":1249},{"style":265},[1250],{"type":47,"value":1251},"name ",{"type":42,"tag":128,"props":1253,"children":1254},{"style":259},[1255],{"type":47,"value":1256},"??",{"type":42,"tag":128,"props":1258,"children":1259},{"style":265},[1260],{"type":47,"value":679},{"type":42,"tag":128,"props":1262,"children":1263},{"style":259},[1264],{"type":47,"value":83},{"type":42,"tag":128,"props":1266,"children":1267},{"style":265},[1268],{"type":47,"value":865},{"type":42,"tag":128,"props":1270,"children":1271},{"style":259},[1272],{"type":47,"value":439},{"type":42,"tag":128,"props":1274,"children":1275},{"style":695},[1276],{"type":47,"value":383},{"type":42,"tag":128,"props":1278,"children":1279},{"class":130,"line":464},[1280,1285,1290,1294,1299,1303],{"type":42,"tag":128,"props":1281,"children":1282},{"style":259},[1283],{"type":47,"value":1284},"  }",{"type":42,"tag":128,"props":1286,"children":1287},{"style":253},[1288],{"type":47,"value":1289}," catch",{"type":42,"tag":128,"props":1291,"children":1292},{"style":695},[1293],{"type":47,"value":618},{"type":42,"tag":128,"props":1295,"children":1296},{"style":265},[1297],{"type":47,"value":1298},"error",{"type":42,"tag":128,"props":1300,"children":1301},{"style":695},[1302],{"type":47,"value":723},{"type":42,"tag":128,"props":1304,"children":1305},{"style":259},[1306],{"type":47,"value":1307},"{\n",{"type":42,"tag":128,"props":1309,"children":1310},{"class":130,"line":789},[1311,1316,1320,1324,1329,1333,1337],{"type":42,"tag":128,"props":1312,"children":1313},{"style":253},[1314],{"type":47,"value":1315},"    if",{"type":42,"tag":128,"props":1317,"children":1318},{"style":695},[1319],{"type":47,"value":618},{"type":42,"tag":128,"props":1321,"children":1322},{"style":265},[1323],{"type":47,"value":1298},{"type":42,"tag":128,"props":1325,"children":1326},{"style":259},[1327],{"type":47,"value":1328}," instanceof",{"type":42,"tag":128,"props":1330,"children":1331},{"style":135},[1332],{"type":47,"value":1070},{"type":42,"tag":128,"props":1334,"children":1335},{"style":695},[1336],{"type":47,"value":723},{"type":42,"tag":128,"props":1338,"children":1339},{"style":259},[1340],{"type":47,"value":1307},{"type":42,"tag":128,"props":1342,"children":1343},{"class":130,"line":876},[1344,1349,1353,1357,1361,1366,1371,1375,1380,1384,1389,1393,1398,1403,1407,1412],{"type":42,"tag":128,"props":1345,"children":1346},{"style":340},[1347],{"type":47,"value":1348},"      showError",{"type":42,"tag":128,"props":1350,"children":1351},{"style":695},[1352],{"type":47,"value":347},{"type":42,"tag":128,"props":1354,"children":1355},{"style":265},[1356],{"type":47,"value":1298},{"type":42,"tag":128,"props":1358,"children":1359},{"style":259},[1360],{"type":47,"value":83},{"type":42,"tag":128,"props":1362,"children":1363},{"style":265},[1364],{"type":47,"value":1365},"status",{"type":42,"tag":128,"props":1367,"children":1368},{"style":259},[1369],{"type":47,"value":1370}," ===",{"type":42,"tag":128,"props":1372,"children":1373},{"style":775},[1374],{"type":47,"value":778},{"type":42,"tag":128,"props":1376,"children":1377},{"style":259},[1378],{"type":47,"value":1379}," ?",{"type":42,"tag":128,"props":1381,"children":1382},{"style":259},[1383],{"type":47,"value":293},{"type":42,"tag":128,"props":1385,"children":1386},{"style":141},[1387],{"type":47,"value":1388},"Invalid email or password.",{"type":42,"tag":128,"props":1390,"children":1391},{"style":259},[1392],{"type":47,"value":352},{"type":42,"tag":128,"props":1394,"children":1395},{"style":259},[1396],{"type":47,"value":1397}," :",{"type":42,"tag":128,"props":1399,"children":1400},{"style":265},[1401],{"type":47,"value":1402}," error",{"type":42,"tag":128,"props":1404,"children":1405},{"style":259},[1406],{"type":47,"value":83},{"type":42,"tag":128,"props":1408,"children":1409},{"style":265},[1410],{"type":47,"value":1411},"message",{"type":42,"tag":128,"props":1413,"children":1414},{"style":695},[1415],{"type":47,"value":383},{"type":42,"tag":128,"props":1417,"children":1418},{"class":130,"line":1011},[1419],{"type":42,"tag":128,"props":1420,"children":1421},{"style":259},[1422],{"type":47,"value":1423},"    }\n",{"type":42,"tag":128,"props":1425,"children":1427},{"class":130,"line":1426},11,[1428],{"type":42,"tag":128,"props":1429,"children":1430},{"style":259},[1431],{"type":47,"value":1432},"  }\n",{"type":42,"tag":128,"props":1434,"children":1436},{"class":130,"line":1435},12,[1437],{"type":42,"tag":128,"props":1438,"children":1439},{"style":259},[1440],{"type":47,"value":882},{"type":42,"tag":194,"props":1442,"children":1444},{"id":1443},"signup",[1445],{"type":47,"value":1446},"Signup",{"type":42,"tag":50,"props":1448,"children":1449},{},[1450,1452,1458],{"type":47,"value":1451},"After signup, check ",{"type":42,"tag":76,"props":1453,"children":1455},{"className":1454},[],[1456],{"type":47,"value":1457},"user.emailVerified",{"type":47,"value":1459}," to determine if the user was auto-confirmed or needs to confirm their email.",{"type":42,"tag":117,"props":1461,"children":1463},{"className":241,"code":1462,"language":243,"meta":122,"style":122},"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",[1464],{"type":42,"tag":76,"props":1465,"children":1466},{"__ignoreMap":122},[1467,1511,1518,1591,1602,1670,1702,1710,1739,1756,1764,1792,1799,1827,1859,1929,1937,1945],{"type":42,"tag":128,"props":1468,"children":1469},{"class":130,"line":131},[1470,1474,1478,1483,1487,1491,1495,1499,1503,1507],{"type":42,"tag":128,"props":1471,"children":1472},{"style":253},[1473],{"type":47,"value":256},{"type":42,"tag":128,"props":1475,"children":1476},{"style":259},[1477],{"type":47,"value":262},{"type":42,"tag":128,"props":1479,"children":1480},{"style":265},[1481],{"type":47,"value":1482}," signup",{"type":42,"tag":128,"props":1484,"children":1485},{"style":259},[1486],{"type":47,"value":273},{"type":42,"tag":128,"props":1488,"children":1489},{"style":265},[1490],{"type":47,"value":1070},{"type":42,"tag":128,"props":1492,"children":1493},{"style":259},[1494],{"type":47,"value":283},{"type":42,"tag":128,"props":1496,"children":1497},{"style":253},[1498],{"type":47,"value":288},{"type":42,"tag":128,"props":1500,"children":1501},{"style":259},[1502],{"type":47,"value":293},{"type":42,"tag":128,"props":1504,"children":1505},{"style":141},[1506],{"type":47,"value":81},{"type":42,"tag":128,"props":1508,"children":1509},{"style":259},[1510],{"type":47,"value":302},{"type":42,"tag":128,"props":1512,"children":1513},{"class":130,"line":305},[1514],{"type":42,"tag":128,"props":1515,"children":1516},{"emptyLinePlaceholder":309},[1517],{"type":47,"value":312},{"type":42,"tag":128,"props":1519,"children":1520},{"class":130,"line":315},[1521,1525,1529,1534,1538,1542,1546,1550,1554,1558,1562,1566,1570,1575,1579,1583,1587],{"type":42,"tag":128,"props":1522,"children":1523},{"style":319},[1524],{"type":47,"value":1105},{"type":42,"tag":128,"props":1526,"children":1527},{"style":319},[1528],{"type":47,"value":1110},{"type":42,"tag":128,"props":1530,"children":1531},{"style":340},[1532],{"type":47,"value":1533}," handleSignup",{"type":42,"tag":128,"props":1535,"children":1536},{"style":259},[1537],{"type":47,"value":347},{"type":42,"tag":128,"props":1539,"children":1540},{"style":621},[1541],{"type":47,"value":865},{"type":42,"tag":128,"props":1543,"children":1544},{"style":259},[1545],{"type":47,"value":629},{"type":42,"tag":128,"props":1547,"children":1548},{"style":135},[1549],{"type":47,"value":1132},{"type":42,"tag":128,"props":1551,"children":1552},{"style":259},[1553],{"type":47,"value":273},{"type":42,"tag":128,"props":1555,"children":1556},{"style":621},[1557],{"type":47,"value":1141},{"type":42,"tag":128,"props":1559,"children":1560},{"style":259},[1561],{"type":47,"value":629},{"type":42,"tag":128,"props":1563,"children":1564},{"style":135},[1565],{"type":47,"value":1132},{"type":42,"tag":128,"props":1567,"children":1568},{"style":259},[1569],{"type":47,"value":273},{"type":42,"tag":128,"props":1571,"children":1572},{"style":621},[1573],{"type":47,"value":1574}," name",{"type":42,"tag":128,"props":1576,"children":1577},{"style":259},[1578],{"type":47,"value":629},{"type":42,"tag":128,"props":1580,"children":1581},{"style":135},[1582],{"type":47,"value":1132},{"type":42,"tag":128,"props":1584,"children":1585},{"style":259},[1586],{"type":47,"value":656},{"type":42,"tag":128,"props":1588,"children":1589},{"style":259},[1590],{"type":47,"value":666},{"type":42,"tag":128,"props":1592,"children":1593},{"class":130,"line":386},[1594,1598],{"type":42,"tag":128,"props":1595,"children":1596},{"style":253},[1597],{"type":47,"value":1165},{"type":42,"tag":128,"props":1599,"children":1600},{"style":259},[1601],{"type":47,"value":666},{"type":42,"tag":128,"props":1603,"children":1604},{"class":130,"line":446},[1605,1609,1613,1617,1621,1625,1629,1633,1637,1641,1645,1649,1654,1658,1662,1666],{"type":42,"tag":128,"props":1606,"children":1607},{"style":319},[1608],{"type":47,"value":1177},{"type":42,"tag":128,"props":1610,"children":1611},{"style":265},[1612],{"type":47,"value":679},{"type":42,"tag":128,"props":1614,"children":1615},{"style":259},[1616],{"type":47,"value":684},{"type":42,"tag":128,"props":1618,"children":1619},{"style":253},[1620],{"type":47,"value":337},{"type":42,"tag":128,"props":1622,"children":1623},{"style":340},[1624],{"type":47,"value":1482},{"type":42,"tag":128,"props":1626,"children":1627},{"style":695},[1628],{"type":47,"value":347},{"type":42,"tag":128,"props":1630,"children":1631},{"style":265},[1632],{"type":47,"value":865},{"type":42,"tag":128,"props":1634,"children":1635},{"style":259},[1636],{"type":47,"value":273},{"type":42,"tag":128,"props":1638,"children":1639},{"style":265},[1640],{"type":47,"value":1141},{"type":42,"tag":128,"props":1642,"children":1643},{"style":259},[1644],{"type":47,"value":273},{"type":42,"tag":128,"props":1646,"children":1647},{"style":259},[1648],{"type":47,"value":262},{"type":42,"tag":128,"props":1650,"children":1651},{"style":695},[1652],{"type":47,"value":1653}," full_name",{"type":42,"tag":128,"props":1655,"children":1656},{"style":259},[1657],{"type":47,"value":629},{"type":42,"tag":128,"props":1659,"children":1660},{"style":265},[1661],{"type":47,"value":1574},{"type":42,"tag":128,"props":1663,"children":1664},{"style":259},[1665],{"type":47,"value":283},{"type":42,"tag":128,"props":1667,"children":1668},{"style":695},[1669],{"type":47,"value":383},{"type":42,"tag":128,"props":1671,"children":1672},{"class":130,"line":454},[1673,1677,1681,1685,1689,1694,1698],{"type":42,"tag":128,"props":1674,"children":1675},{"style":253},[1676],{"type":47,"value":1315},{"type":42,"tag":128,"props":1678,"children":1679},{"style":695},[1680],{"type":47,"value":618},{"type":42,"tag":128,"props":1682,"children":1683},{"style":265},[1684],{"type":47,"value":425},{"type":42,"tag":128,"props":1686,"children":1687},{"style":259},[1688],{"type":47,"value":83},{"type":42,"tag":128,"props":1690,"children":1691},{"style":265},[1692],{"type":47,"value":1693},"emailVerified",{"type":42,"tag":128,"props":1695,"children":1696},{"style":695},[1697],{"type":47,"value":723},{"type":42,"tag":128,"props":1699,"children":1700},{"style":259},[1701],{"type":47,"value":1307},{"type":42,"tag":128,"props":1703,"children":1704},{"class":130,"line":464},[1705],{"type":42,"tag":128,"props":1706,"children":1707},{"style":458},[1708],{"type":47,"value":1709},"      \u002F\u002F Autoconfirm ON — user is logged in immediately\n",{"type":42,"tag":128,"props":1711,"children":1712},{"class":130,"line":789},[1713,1718,1722,1726,1731,1735],{"type":42,"tag":128,"props":1714,"children":1715},{"style":340},[1716],{"type":47,"value":1717},"      showSuccess",{"type":42,"tag":128,"props":1719,"children":1720},{"style":695},[1721],{"type":47,"value":347},{"type":42,"tag":128,"props":1723,"children":1724},{"style":259},[1725],{"type":47,"value":352},{"type":42,"tag":128,"props":1727,"children":1728},{"style":141},[1729],{"type":47,"value":1730},"Account created. You are now logged in.",{"type":42,"tag":128,"props":1732,"children":1733},{"style":259},[1734],{"type":47,"value":352},{"type":42,"tag":128,"props":1736,"children":1737},{"style":695},[1738],{"type":47,"value":383},{"type":42,"tag":128,"props":1740,"children":1741},{"class":130,"line":876},[1742,1747,1752],{"type":42,"tag":128,"props":1743,"children":1744},{"style":259},[1745],{"type":47,"value":1746},"    }",{"type":42,"tag":128,"props":1748,"children":1749},{"style":253},[1750],{"type":47,"value":1751}," else",{"type":42,"tag":128,"props":1753,"children":1754},{"style":259},[1755],{"type":47,"value":666},{"type":42,"tag":128,"props":1757,"children":1758},{"class":130,"line":1011},[1759],{"type":42,"tag":128,"props":1760,"children":1761},{"style":458},[1762],{"type":47,"value":1763},"      \u002F\u002F Autoconfirm OFF — confirmation email sent\n",{"type":42,"tag":128,"props":1765,"children":1766},{"class":130,"line":1426},[1767,1771,1775,1779,1784,1788],{"type":42,"tag":128,"props":1768,"children":1769},{"style":340},[1770],{"type":47,"value":1717},{"type":42,"tag":128,"props":1772,"children":1773},{"style":695},[1774],{"type":47,"value":347},{"type":42,"tag":128,"props":1776,"children":1777},{"style":259},[1778],{"type":47,"value":352},{"type":42,"tag":128,"props":1780,"children":1781},{"style":141},[1782],{"type":47,"value":1783},"Check your email to confirm your account.",{"type":42,"tag":128,"props":1785,"children":1786},{"style":259},[1787],{"type":47,"value":352},{"type":42,"tag":128,"props":1789,"children":1790},{"style":695},[1791],{"type":47,"value":383},{"type":42,"tag":128,"props":1793,"children":1794},{"class":130,"line":1435},[1795],{"type":42,"tag":128,"props":1796,"children":1797},{"style":259},[1798],{"type":47,"value":1423},{"type":42,"tag":128,"props":1800,"children":1802},{"class":130,"line":1801},13,[1803,1807,1811,1815,1819,1823],{"type":42,"tag":128,"props":1804,"children":1805},{"style":259},[1806],{"type":47,"value":1284},{"type":42,"tag":128,"props":1808,"children":1809},{"style":253},[1810],{"type":47,"value":1289},{"type":42,"tag":128,"props":1812,"children":1813},{"style":695},[1814],{"type":47,"value":618},{"type":42,"tag":128,"props":1816,"children":1817},{"style":265},[1818],{"type":47,"value":1298},{"type":42,"tag":128,"props":1820,"children":1821},{"style":695},[1822],{"type":47,"value":723},{"type":42,"tag":128,"props":1824,"children":1825},{"style":259},[1826],{"type":47,"value":1307},{"type":42,"tag":128,"props":1828,"children":1830},{"class":130,"line":1829},14,[1831,1835,1839,1843,1847,1851,1855],{"type":42,"tag":128,"props":1832,"children":1833},{"style":253},[1834],{"type":47,"value":1315},{"type":42,"tag":128,"props":1836,"children":1837},{"style":695},[1838],{"type":47,"value":618},{"type":42,"tag":128,"props":1840,"children":1841},{"style":265},[1842],{"type":47,"value":1298},{"type":42,"tag":128,"props":1844,"children":1845},{"style":259},[1846],{"type":47,"value":1328},{"type":42,"tag":128,"props":1848,"children":1849},{"style":135},[1850],{"type":47,"value":1070},{"type":42,"tag":128,"props":1852,"children":1853},{"style":695},[1854],{"type":47,"value":723},{"type":42,"tag":128,"props":1856,"children":1857},{"style":259},[1858],{"type":47,"value":1307},{"type":42,"tag":128,"props":1860,"children":1862},{"class":130,"line":1861},15,[1863,1867,1871,1875,1879,1883,1887,1892,1896,1900,1905,1909,1913,1917,1921,1925],{"type":42,"tag":128,"props":1864,"children":1865},{"style":340},[1866],{"type":47,"value":1348},{"type":42,"tag":128,"props":1868,"children":1869},{"style":695},[1870],{"type":47,"value":347},{"type":42,"tag":128,"props":1872,"children":1873},{"style":265},[1874],{"type":47,"value":1298},{"type":42,"tag":128,"props":1876,"children":1877},{"style":259},[1878],{"type":47,"value":83},{"type":42,"tag":128,"props":1880,"children":1881},{"style":265},[1882],{"type":47,"value":1365},{"type":42,"tag":128,"props":1884,"children":1885},{"style":259},[1886],{"type":47,"value":1370},{"type":42,"tag":128,"props":1888,"children":1889},{"style":775},[1890],{"type":47,"value":1891}," 403",{"type":42,"tag":128,"props":1893,"children":1894},{"style":259},[1895],{"type":47,"value":1379},{"type":42,"tag":128,"props":1897,"children":1898},{"style":259},[1899],{"type":47,"value":293},{"type":42,"tag":128,"props":1901,"children":1902},{"style":141},[1903],{"type":47,"value":1904},"Signups are not allowed.",{"type":42,"tag":128,"props":1906,"children":1907},{"style":259},[1908],{"type":47,"value":352},{"type":42,"tag":128,"props":1910,"children":1911},{"style":259},[1912],{"type":47,"value":1397},{"type":42,"tag":128,"props":1914,"children":1915},{"style":265},[1916],{"type":47,"value":1402},{"type":42,"tag":128,"props":1918,"children":1919},{"style":259},[1920],{"type":47,"value":83},{"type":42,"tag":128,"props":1922,"children":1923},{"style":265},[1924],{"type":47,"value":1411},{"type":42,"tag":128,"props":1926,"children":1927},{"style":695},[1928],{"type":47,"value":383},{"type":42,"tag":128,"props":1930,"children":1932},{"class":130,"line":1931},16,[1933],{"type":42,"tag":128,"props":1934,"children":1935},{"style":259},[1936],{"type":47,"value":1423},{"type":42,"tag":128,"props":1938,"children":1940},{"class":130,"line":1939},17,[1941],{"type":42,"tag":128,"props":1942,"children":1943},{"style":259},[1944],{"type":47,"value":1432},{"type":42,"tag":128,"props":1946,"children":1948},{"class":130,"line":1947},18,[1949],{"type":42,"tag":128,"props":1950,"children":1951},{"style":259},[1952],{"type":47,"value":882},{"type":42,"tag":194,"props":1954,"children":1956},{"id":1955},"logout",[1957],{"type":47,"value":1958},"Logout",{"type":42,"tag":117,"props":1960,"children":1962},{"className":241,"code":1961,"language":243,"meta":122,"style":122},"import { logout } from '@netlify\u002Fidentity'\n\nawait logout()\n",[1963],{"type":42,"tag":76,"props":1964,"children":1965},{"__ignoreMap":122},[1966,2002,2009],{"type":42,"tag":128,"props":1967,"children":1968},{"class":130,"line":131},[1969,1973,1977,1982,1986,1990,1994,1998],{"type":42,"tag":128,"props":1970,"children":1971},{"style":253},[1972],{"type":47,"value":256},{"type":42,"tag":128,"props":1974,"children":1975},{"style":259},[1976],{"type":47,"value":262},{"type":42,"tag":128,"props":1978,"children":1979},{"style":265},[1980],{"type":47,"value":1981}," logout",{"type":42,"tag":128,"props":1983,"children":1984},{"style":259},[1985],{"type":47,"value":283},{"type":42,"tag":128,"props":1987,"children":1988},{"style":253},[1989],{"type":47,"value":288},{"type":42,"tag":128,"props":1991,"children":1992},{"style":259},[1993],{"type":47,"value":293},{"type":42,"tag":128,"props":1995,"children":1996},{"style":141},[1997],{"type":47,"value":81},{"type":42,"tag":128,"props":1999,"children":2000},{"style":259},[2001],{"type":47,"value":302},{"type":42,"tag":128,"props":2003,"children":2004},{"class":130,"line":305},[2005],{"type":42,"tag":128,"props":2006,"children":2007},{"emptyLinePlaceholder":309},[2008],{"type":47,"value":312},{"type":42,"tag":128,"props":2010,"children":2011},{"class":130,"line":315},[2012,2017,2021],{"type":42,"tag":128,"props":2013,"children":2014},{"style":253},[2015],{"type":47,"value":2016},"await",{"type":42,"tag":128,"props":2018,"children":2019},{"style":340},[2020],{"type":47,"value":1981},{"type":42,"tag":128,"props":2022,"children":2023},{"style":265},[2024],{"type":47,"value":491},{"type":42,"tag":194,"props":2026,"children":2028},{"id":2027},"oauth",[2029],{"type":47,"value":2030},"OAuth",{"type":42,"tag":50,"props":2032,"children":2033},{},[2034,2036,2042,2044,2050],{"type":47,"value":2035},"OAuth is a two-step flow: ",{"type":42,"tag":76,"props":2037,"children":2039},{"className":2038},[],[2040],{"type":47,"value":2041},"oauthLogin(provider)",{"type":47,"value":2043}," redirects away from the site, then ",{"type":42,"tag":76,"props":2045,"children":2047},{"className":2046},[],[2048],{"type":47,"value":2049},"handleAuthCallback()",{"type":47,"value":2051}," processes the redirect when the user returns.",{"type":42,"tag":117,"props":2053,"children":2055},{"className":241,"code":2054,"language":243,"meta":122,"style":122},"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",[2056],{"type":42,"tag":76,"props":2057,"children":2058},{"__ignoreMap":122},[2059,2095,2102,2110,2209,2228],{"type":42,"tag":128,"props":2060,"children":2061},{"class":130,"line":131},[2062,2066,2070,2075,2079,2083,2087,2091],{"type":42,"tag":128,"props":2063,"children":2064},{"style":253},[2065],{"type":47,"value":256},{"type":42,"tag":128,"props":2067,"children":2068},{"style":259},[2069],{"type":47,"value":262},{"type":42,"tag":128,"props":2071,"children":2072},{"style":265},[2073],{"type":47,"value":2074}," oauthLogin",{"type":42,"tag":128,"props":2076,"children":2077},{"style":259},[2078],{"type":47,"value":283},{"type":42,"tag":128,"props":2080,"children":2081},{"style":253},[2082],{"type":47,"value":288},{"type":42,"tag":128,"props":2084,"children":2085},{"style":259},[2086],{"type":47,"value":293},{"type":42,"tag":128,"props":2088,"children":2089},{"style":141},[2090],{"type":47,"value":81},{"type":42,"tag":128,"props":2092,"children":2093},{"style":259},[2094],{"type":47,"value":302},{"type":42,"tag":128,"props":2096,"children":2097},{"class":130,"line":305},[2098],{"type":42,"tag":128,"props":2099,"children":2100},{"emptyLinePlaceholder":309},[2101],{"type":47,"value":312},{"type":42,"tag":128,"props":2103,"children":2104},{"class":130,"line":315},[2105],{"type":42,"tag":128,"props":2106,"children":2107},{"style":458},[2108],{"type":47,"value":2109},"\u002F\u002F Step 1: Redirect to provider (navigates away — never returns)\n",{"type":42,"tag":128,"props":2111,"children":2112},{"class":130,"line":386},[2113,2118,2123,2127,2132,2136,2140,2145,2149,2154,2158,2163,2167,2171,2175,2180,2184,2188,2192,2197,2201,2205],{"type":42,"tag":128,"props":2114,"children":2115},{"style":319},[2116],{"type":47,"value":2117},"function",{"type":42,"tag":128,"props":2119,"children":2120},{"style":340},[2121],{"type":47,"value":2122}," handleOAuthClick",{"type":42,"tag":128,"props":2124,"children":2125},{"style":259},[2126],{"type":47,"value":347},{"type":42,"tag":128,"props":2128,"children":2129},{"style":621},[2130],{"type":47,"value":2131},"provider",{"type":42,"tag":128,"props":2133,"children":2134},{"style":259},[2135],{"type":47,"value":629},{"type":42,"tag":128,"props":2137,"children":2138},{"style":259},[2139],{"type":47,"value":293},{"type":42,"tag":128,"props":2141,"children":2142},{"style":141},[2143],{"type":47,"value":2144},"google",{"type":42,"tag":128,"props":2146,"children":2147},{"style":259},[2148],{"type":47,"value":352},{"type":42,"tag":128,"props":2150,"children":2151},{"style":259},[2152],{"type":47,"value":2153}," |",{"type":42,"tag":128,"props":2155,"children":2156},{"style":259},[2157],{"type":47,"value":293},{"type":42,"tag":128,"props":2159,"children":2160},{"style":141},[2161],{"type":47,"value":2162},"github",{"type":42,"tag":128,"props":2164,"children":2165},{"style":259},[2166],{"type":47,"value":352},{"type":42,"tag":128,"props":2168,"children":2169},{"style":259},[2170],{"type":47,"value":2153},{"type":42,"tag":128,"props":2172,"children":2173},{"style":259},[2174],{"type":47,"value":293},{"type":42,"tag":128,"props":2176,"children":2177},{"style":141},[2178],{"type":47,"value":2179},"gitlab",{"type":42,"tag":128,"props":2181,"children":2182},{"style":259},[2183],{"type":47,"value":352},{"type":42,"tag":128,"props":2185,"children":2186},{"style":259},[2187],{"type":47,"value":2153},{"type":42,"tag":128,"props":2189,"children":2190},{"style":259},[2191],{"type":47,"value":293},{"type":42,"tag":128,"props":2193,"children":2194},{"style":141},[2195],{"type":47,"value":2196},"bitbucket",{"type":42,"tag":128,"props":2198,"children":2199},{"style":259},[2200],{"type":47,"value":352},{"type":42,"tag":128,"props":2202,"children":2203},{"style":259},[2204],{"type":47,"value":656},{"type":42,"tag":128,"props":2206,"children":2207},{"style":259},[2208],{"type":47,"value":666},{"type":42,"tag":128,"props":2210,"children":2211},{"class":130,"line":446},[2212,2216,2220,2224],{"type":42,"tag":128,"props":2213,"children":2214},{"style":340},[2215],{"type":47,"value":980},{"type":42,"tag":128,"props":2217,"children":2218},{"style":695},[2219],{"type":47,"value":347},{"type":42,"tag":128,"props":2221,"children":2222},{"style":265},[2223],{"type":47,"value":2131},{"type":42,"tag":128,"props":2225,"children":2226},{"style":695},[2227],{"type":47,"value":383},{"type":42,"tag":128,"props":2229,"children":2230},{"class":130,"line":454},[2231],{"type":42,"tag":128,"props":2232,"children":2233},{"style":259},[2234],{"type":47,"value":882},{"type":42,"tag":50,"props":2236,"children":2237},{},[2238,2240,2245],{"type":47,"value":2239},"Enable providers in ",{"type":42,"tag":70,"props":2241,"children":2242},{},[2243],{"type":47,"value":2244},"Project configuration > Identity > External providers",{"type":47,"value":2246}," before using OAuth.",{"type":42,"tag":194,"props":2248,"children":2250},{"id":2249},"handling-callbacks",[2251],{"type":47,"value":2252},"Handling Callbacks",{"type":42,"tag":50,"props":2254,"children":2255},{},[2256,2258,2263],{"type":47,"value":2257},"Always call ",{"type":42,"tag":76,"props":2259,"children":2261},{"className":2260},[],[2262],{"type":47,"value":2049},{"type":47,"value":2264}," 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":42,"tag":117,"props":2266,"children":2268},{"className":241,"code":2267,"language":243,"meta":122,"style":122},"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",[2269],{"type":42,"tag":76,"props":2270,"children":2271},{"__ignoreMap":122},[2272,2316,2323,2348,2359,2387,2420,2427,2460,2485,2539,2547,2571,2599,2606,2630,2638,2666,2673,2698,2707,2737,2745,2770,2799,2807,2815,2843,2896,2904],{"type":42,"tag":128,"props":2273,"children":2274},{"class":130,"line":131},[2275,2279,2283,2288,2292,2296,2300,2304,2308,2312],{"type":42,"tag":128,"props":2276,"children":2277},{"style":253},[2278],{"type":47,"value":256},{"type":42,"tag":128,"props":2280,"children":2281},{"style":259},[2282],{"type":47,"value":262},{"type":42,"tag":128,"props":2284,"children":2285},{"style":265},[2286],{"type":47,"value":2287}," handleAuthCallback",{"type":42,"tag":128,"props":2289,"children":2290},{"style":259},[2291],{"type":47,"value":273},{"type":42,"tag":128,"props":2293,"children":2294},{"style":265},[2295],{"type":47,"value":1070},{"type":42,"tag":128,"props":2297,"children":2298},{"style":259},[2299],{"type":47,"value":283},{"type":42,"tag":128,"props":2301,"children":2302},{"style":253},[2303],{"type":47,"value":288},{"type":42,"tag":128,"props":2305,"children":2306},{"style":259},[2307],{"type":47,"value":293},{"type":42,"tag":128,"props":2309,"children":2310},{"style":141},[2311],{"type":47,"value":81},{"type":42,"tag":128,"props":2313,"children":2314},{"style":259},[2315],{"type":47,"value":302},{"type":42,"tag":128,"props":2317,"children":2318},{"class":130,"line":305},[2319],{"type":42,"tag":128,"props":2320,"children":2321},{"emptyLinePlaceholder":309},[2322],{"type":47,"value":312},{"type":42,"tag":128,"props":2324,"children":2325},{"class":130,"line":315},[2326,2330,2334,2339,2344],{"type":42,"tag":128,"props":2327,"children":2328},{"style":319},[2329],{"type":47,"value":1105},{"type":42,"tag":128,"props":2331,"children":2332},{"style":319},[2333],{"type":47,"value":1110},{"type":42,"tag":128,"props":2335,"children":2336},{"style":340},[2337],{"type":47,"value":2338}," processCallback",{"type":42,"tag":128,"props":2340,"children":2341},{"style":259},[2342],{"type":47,"value":2343},"()",{"type":42,"tag":128,"props":2345,"children":2346},{"style":259},[2347],{"type":47,"value":666},{"type":42,"tag":128,"props":2349,"children":2350},{"class":130,"line":386},[2351,2355],{"type":42,"tag":128,"props":2352,"children":2353},{"style":253},[2354],{"type":47,"value":1165},{"type":42,"tag":128,"props":2356,"children":2357},{"style":259},[2358],{"type":47,"value":666},{"type":42,"tag":128,"props":2360,"children":2361},{"class":130,"line":446},[2362,2366,2371,2375,2379,2383],{"type":42,"tag":128,"props":2363,"children":2364},{"style":319},[2365],{"type":47,"value":1177},{"type":42,"tag":128,"props":2367,"children":2368},{"style":265},[2369],{"type":47,"value":2370}," result",{"type":42,"tag":128,"props":2372,"children":2373},{"style":259},[2374],{"type":47,"value":684},{"type":42,"tag":128,"props":2376,"children":2377},{"style":253},[2378],{"type":47,"value":337},{"type":42,"tag":128,"props":2380,"children":2381},{"style":340},[2382],{"type":47,"value":2287},{"type":42,"tag":128,"props":2384,"children":2385},{"style":695},[2386],{"type":47,"value":491},{"type":42,"tag":128,"props":2388,"children":2389},{"class":130,"line":454},[2390,2394,2398,2402,2407,2411,2415],{"type":42,"tag":128,"props":2391,"children":2392},{"style":253},[2393],{"type":47,"value":1315},{"type":42,"tag":128,"props":2395,"children":2396},{"style":695},[2397],{"type":47,"value":618},{"type":42,"tag":128,"props":2399,"children":2400},{"style":259},[2401],{"type":47,"value":714},{"type":42,"tag":128,"props":2403,"children":2404},{"style":265},[2405],{"type":47,"value":2406},"result",{"type":42,"tag":128,"props":2408,"children":2409},{"style":695},[2410],{"type":47,"value":723},{"type":42,"tag":128,"props":2412,"children":2413},{"style":253},[2414],{"type":47,"value":728},{"type":42,"tag":128,"props":2416,"children":2417},{"style":458},[2418],{"type":47,"value":2419}," \u002F\u002F No callback hash — normal page load\n",{"type":42,"tag":128,"props":2421,"children":2422},{"class":130,"line":464},[2423],{"type":42,"tag":128,"props":2424,"children":2425},{"emptyLinePlaceholder":309},[2426],{"type":47,"value":312},{"type":42,"tag":128,"props":2428,"children":2429},{"class":130,"line":789},[2430,2435,2439,2443,2447,2452,2456],{"type":42,"tag":128,"props":2431,"children":2432},{"style":253},[2433],{"type":47,"value":2434},"    switch",{"type":42,"tag":128,"props":2436,"children":2437},{"style":695},[2438],{"type":47,"value":618},{"type":42,"tag":128,"props":2440,"children":2441},{"style":265},[2442],{"type":47,"value":2406},{"type":42,"tag":128,"props":2444,"children":2445},{"style":259},[2446],{"type":47,"value":83},{"type":42,"tag":128,"props":2448,"children":2449},{"style":265},[2450],{"type":47,"value":2451},"type",{"type":42,"tag":128,"props":2453,"children":2454},{"style":695},[2455],{"type":47,"value":723},{"type":42,"tag":128,"props":2457,"children":2458},{"style":259},[2459],{"type":47,"value":1307},{"type":42,"tag":128,"props":2461,"children":2462},{"class":130,"line":876},[2463,2468,2472,2476,2480],{"type":42,"tag":128,"props":2464,"children":2465},{"style":253},[2466],{"type":47,"value":2467},"      case",{"type":42,"tag":128,"props":2469,"children":2470},{"style":259},[2471],{"type":47,"value":293},{"type":42,"tag":128,"props":2473,"children":2474},{"style":141},[2475],{"type":47,"value":2027},{"type":42,"tag":128,"props":2477,"children":2478},{"style":259},[2479],{"type":47,"value":352},{"type":42,"tag":128,"props":2481,"children":2482},{"style":259},[2483],{"type":47,"value":2484},":\n",{"type":42,"tag":128,"props":2486,"children":2487},{"class":130,"line":1011},[2488,2493,2497,2501,2506,2510,2514,2518,2522,2527,2531,2535],{"type":42,"tag":128,"props":2489,"children":2490},{"style":340},[2491],{"type":47,"value":2492},"        showSuccess",{"type":42,"tag":128,"props":2494,"children":2495},{"style":695},[2496],{"type":47,"value":347},{"type":42,"tag":128,"props":2498,"children":2499},{"style":259},[2500],{"type":47,"value":410},{"type":42,"tag":128,"props":2502,"children":2503},{"style":141},[2504],{"type":47,"value":2505},"Logged in as ",{"type":42,"tag":128,"props":2507,"children":2508},{"style":259},[2509],{"type":47,"value":420},{"type":42,"tag":128,"props":2511,"children":2512},{"style":265},[2513],{"type":47,"value":2406},{"type":42,"tag":128,"props":2515,"children":2516},{"style":259},[2517],{"type":47,"value":83},{"type":42,"tag":128,"props":2519,"children":2520},{"style":265},[2521],{"type":47,"value":425},{"type":42,"tag":128,"props":2523,"children":2524},{"style":259},[2525],{"type":47,"value":2526},"?.",{"type":42,"tag":128,"props":2528,"children":2529},{"style":265},[2530],{"type":47,"value":865},{"type":42,"tag":128,"props":2532,"children":2533},{"style":259},[2534],{"type":47,"value":439},{"type":42,"tag":128,"props":2536,"children":2537},{"style":695},[2538],{"type":47,"value":383},{"type":42,"tag":128,"props":2540,"children":2541},{"class":130,"line":1426},[2542],{"type":42,"tag":128,"props":2543,"children":2544},{"style":253},[2545],{"type":47,"value":2546},"        break\n",{"type":42,"tag":128,"props":2548,"children":2549},{"class":130,"line":1435},[2550,2554,2558,2563,2567],{"type":42,"tag":128,"props":2551,"children":2552},{"style":253},[2553],{"type":47,"value":2467},{"type":42,"tag":128,"props":2555,"children":2556},{"style":259},[2557],{"type":47,"value":293},{"type":42,"tag":128,"props":2559,"children":2560},{"style":141},[2561],{"type":47,"value":2562},"confirmation",{"type":42,"tag":128,"props":2564,"children":2565},{"style":259},[2566],{"type":47,"value":352},{"type":42,"tag":128,"props":2568,"children":2569},{"style":259},[2570],{"type":47,"value":2484},{"type":42,"tag":128,"props":2572,"children":2573},{"class":130,"line":1801},[2574,2578,2582,2586,2591,2595],{"type":42,"tag":128,"props":2575,"children":2576},{"style":340},[2577],{"type":47,"value":2492},{"type":42,"tag":128,"props":2579,"children":2580},{"style":695},[2581],{"type":47,"value":347},{"type":42,"tag":128,"props":2583,"children":2584},{"style":259},[2585],{"type":47,"value":352},{"type":42,"tag":128,"props":2587,"children":2588},{"style":141},[2589],{"type":47,"value":2590},"Email confirmed. You are now logged in.",{"type":42,"tag":128,"props":2592,"children":2593},{"style":259},[2594],{"type":47,"value":352},{"type":42,"tag":128,"props":2596,"children":2597},{"style":695},[2598],{"type":47,"value":383},{"type":42,"tag":128,"props":2600,"children":2601},{"class":130,"line":1829},[2602],{"type":42,"tag":128,"props":2603,"children":2604},{"style":253},[2605],{"type":47,"value":2546},{"type":42,"tag":128,"props":2607,"children":2608},{"class":130,"line":1861},[2609,2613,2617,2622,2626],{"type":42,"tag":128,"props":2610,"children":2611},{"style":253},[2612],{"type":47,"value":2467},{"type":42,"tag":128,"props":2614,"children":2615},{"style":259},[2616],{"type":47,"value":293},{"type":42,"tag":128,"props":2618,"children":2619},{"style":141},[2620],{"type":47,"value":2621},"recovery",{"type":42,"tag":128,"props":2623,"children":2624},{"style":259},[2625],{"type":47,"value":352},{"type":42,"tag":128,"props":2627,"children":2628},{"style":259},[2629],{"type":47,"value":2484},{"type":42,"tag":128,"props":2631,"children":2632},{"class":130,"line":1931},[2633],{"type":42,"tag":128,"props":2634,"children":2635},{"style":458},[2636],{"type":47,"value":2637},"        \u002F\u002F User is authenticated but must set a new password\n",{"type":42,"tag":128,"props":2639,"children":2640},{"class":130,"line":1939},[2641,2646,2650,2654,2658,2662],{"type":42,"tag":128,"props":2642,"children":2643},{"style":340},[2644],{"type":47,"value":2645},"        showPasswordResetForm",{"type":42,"tag":128,"props":2647,"children":2648},{"style":695},[2649],{"type":47,"value":347},{"type":42,"tag":128,"props":2651,"children":2652},{"style":265},[2653],{"type":47,"value":2406},{"type":42,"tag":128,"props":2655,"children":2656},{"style":259},[2657],{"type":47,"value":83},{"type":42,"tag":128,"props":2659,"children":2660},{"style":265},[2661],{"type":47,"value":425},{"type":42,"tag":128,"props":2663,"children":2664},{"style":695},[2665],{"type":47,"value":383},{"type":42,"tag":128,"props":2667,"children":2668},{"class":130,"line":1947},[2669],{"type":42,"tag":128,"props":2670,"children":2671},{"style":253},[2672],{"type":47,"value":2546},{"type":42,"tag":128,"props":2674,"children":2676},{"class":130,"line":2675},19,[2677,2681,2685,2690,2694],{"type":42,"tag":128,"props":2678,"children":2679},{"style":253},[2680],{"type":47,"value":2467},{"type":42,"tag":128,"props":2682,"children":2683},{"style":259},[2684],{"type":47,"value":293},{"type":42,"tag":128,"props":2686,"children":2687},{"style":141},[2688],{"type":47,"value":2689},"invite",{"type":42,"tag":128,"props":2691,"children":2692},{"style":259},[2693],{"type":47,"value":352},{"type":42,"tag":128,"props":2695,"children":2696},{"style":259},[2697],{"type":47,"value":2484},{"type":42,"tag":128,"props":2699,"children":2701},{"class":130,"line":2700},20,[2702],{"type":42,"tag":128,"props":2703,"children":2704},{"style":458},[2705],{"type":47,"value":2706},"        \u002F\u002F User must set a password to accept the invite\n",{"type":42,"tag":128,"props":2708,"children":2710},{"class":130,"line":2709},21,[2711,2716,2720,2724,2728,2733],{"type":42,"tag":128,"props":2712,"children":2713},{"style":340},[2714],{"type":47,"value":2715},"        showInviteAcceptForm",{"type":42,"tag":128,"props":2717,"children":2718},{"style":695},[2719],{"type":47,"value":347},{"type":42,"tag":128,"props":2721,"children":2722},{"style":265},[2723],{"type":47,"value":2406},{"type":42,"tag":128,"props":2725,"children":2726},{"style":259},[2727],{"type":47,"value":83},{"type":42,"tag":128,"props":2729,"children":2730},{"style":265},[2731],{"type":47,"value":2732},"token",{"type":42,"tag":128,"props":2734,"children":2735},{"style":695},[2736],{"type":47,"value":383},{"type":42,"tag":128,"props":2738,"children":2740},{"class":130,"line":2739},22,[2741],{"type":42,"tag":128,"props":2742,"children":2743},{"style":253},[2744],{"type":47,"value":2546},{"type":42,"tag":128,"props":2746,"children":2748},{"class":130,"line":2747},23,[2749,2753,2757,2762,2766],{"type":42,"tag":128,"props":2750,"children":2751},{"style":253},[2752],{"type":47,"value":2467},{"type":42,"tag":128,"props":2754,"children":2755},{"style":259},[2756],{"type":47,"value":293},{"type":42,"tag":128,"props":2758,"children":2759},{"style":141},[2760],{"type":47,"value":2761},"email_change",{"type":42,"tag":128,"props":2763,"children":2764},{"style":259},[2765],{"type":47,"value":352},{"type":42,"tag":128,"props":2767,"children":2768},{"style":259},[2769],{"type":47,"value":2484},{"type":42,"tag":128,"props":2771,"children":2773},{"class":130,"line":2772},24,[2774,2778,2782,2786,2791,2795],{"type":42,"tag":128,"props":2775,"children":2776},{"style":340},[2777],{"type":47,"value":2492},{"type":42,"tag":128,"props":2779,"children":2780},{"style":695},[2781],{"type":47,"value":347},{"type":42,"tag":128,"props":2783,"children":2784},{"style":259},[2785],{"type":47,"value":352},{"type":42,"tag":128,"props":2787,"children":2788},{"style":141},[2789],{"type":47,"value":2790},"Email address updated.",{"type":42,"tag":128,"props":2792,"children":2793},{"style":259},[2794],{"type":47,"value":352},{"type":42,"tag":128,"props":2796,"children":2797},{"style":695},[2798],{"type":47,"value":383},{"type":42,"tag":128,"props":2800,"children":2802},{"class":130,"line":2801},25,[2803],{"type":42,"tag":128,"props":2804,"children":2805},{"style":253},[2806],{"type":47,"value":2546},{"type":42,"tag":128,"props":2808,"children":2810},{"class":130,"line":2809},26,[2811],{"type":42,"tag":128,"props":2812,"children":2813},{"style":259},[2814],{"type":47,"value":1423},{"type":42,"tag":128,"props":2816,"children":2818},{"class":130,"line":2817},27,[2819,2823,2827,2831,2835,2839],{"type":42,"tag":128,"props":2820,"children":2821},{"style":259},[2822],{"type":47,"value":1284},{"type":42,"tag":128,"props":2824,"children":2825},{"style":253},[2826],{"type":47,"value":1289},{"type":42,"tag":128,"props":2828,"children":2829},{"style":695},[2830],{"type":47,"value":618},{"type":42,"tag":128,"props":2832,"children":2833},{"style":265},[2834],{"type":47,"value":1298},{"type":42,"tag":128,"props":2836,"children":2837},{"style":695},[2838],{"type":47,"value":723},{"type":42,"tag":128,"props":2840,"children":2841},{"style":259},[2842],{"type":47,"value":1307},{"type":42,"tag":128,"props":2844,"children":2846},{"class":130,"line":2845},28,[2847,2851,2855,2859,2863,2867,2871,2876,2880,2884,2888,2892],{"type":42,"tag":128,"props":2848,"children":2849},{"style":253},[2850],{"type":47,"value":1315},{"type":42,"tag":128,"props":2852,"children":2853},{"style":695},[2854],{"type":47,"value":618},{"type":42,"tag":128,"props":2856,"children":2857},{"style":265},[2858],{"type":47,"value":1298},{"type":42,"tag":128,"props":2860,"children":2861},{"style":259},[2862],{"type":47,"value":1328},{"type":42,"tag":128,"props":2864,"children":2865},{"style":135},[2866],{"type":47,"value":1070},{"type":42,"tag":128,"props":2868,"children":2869},{"style":695},[2870],{"type":47,"value":723},{"type":42,"tag":128,"props":2872,"children":2873},{"style":340},[2874],{"type":47,"value":2875},"showError",{"type":42,"tag":128,"props":2877,"children":2878},{"style":695},[2879],{"type":47,"value":347},{"type":42,"tag":128,"props":2881,"children":2882},{"style":265},[2883],{"type":47,"value":1298},{"type":42,"tag":128,"props":2885,"children":2886},{"style":259},[2887],{"type":47,"value":83},{"type":42,"tag":128,"props":2889,"children":2890},{"style":265},[2891],{"type":47,"value":1411},{"type":42,"tag":128,"props":2893,"children":2894},{"style":695},[2895],{"type":47,"value":383},{"type":42,"tag":128,"props":2897,"children":2899},{"class":130,"line":2898},29,[2900],{"type":42,"tag":128,"props":2901,"children":2902},{"style":259},[2903],{"type":47,"value":1432},{"type":42,"tag":128,"props":2905,"children":2907},{"class":130,"line":2906},30,[2908],{"type":42,"tag":128,"props":2909,"children":2910},{"style":259},[2911],{"type":47,"value":882},{"type":42,"tag":194,"props":2913,"children":2915},{"id":2914},"auth-state",[2916],{"type":47,"value":2917},"Auth State",{"type":42,"tag":117,"props":2919,"children":2921},{"className":241,"code":2920,"language":243,"meta":122,"style":122},"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",[2922],{"type":42,"tag":76,"props":2923,"children":2924},{"__ignoreMap":122},[2925,2978,2985,2993,3020,3027,3035,3088,3112,3137,3190,3198,3222,3258,3265,3289,3296,3320,3372,3379,3403,3439,3446,3453],{"type":42,"tag":128,"props":2926,"children":2927},{"class":130,"line":131},[2928,2932,2936,2940,2944,2949,2953,2958,2962,2966,2970,2974],{"type":42,"tag":128,"props":2929,"children":2930},{"style":253},[2931],{"type":47,"value":256},{"type":42,"tag":128,"props":2933,"children":2934},{"style":259},[2935],{"type":47,"value":262},{"type":42,"tag":128,"props":2937,"children":2938},{"style":265},[2939],{"type":47,"value":278},{"type":42,"tag":128,"props":2941,"children":2942},{"style":259},[2943],{"type":47,"value":273},{"type":42,"tag":128,"props":2945,"children":2946},{"style":265},[2947],{"type":47,"value":2948}," onAuthChange",{"type":42,"tag":128,"props":2950,"children":2951},{"style":259},[2952],{"type":47,"value":273},{"type":42,"tag":128,"props":2954,"children":2955},{"style":265},[2956],{"type":47,"value":2957}," AUTH_EVENTS",{"type":42,"tag":128,"props":2959,"children":2960},{"style":259},[2961],{"type":47,"value":283},{"type":42,"tag":128,"props":2963,"children":2964},{"style":253},[2965],{"type":47,"value":288},{"type":42,"tag":128,"props":2967,"children":2968},{"style":259},[2969],{"type":47,"value":293},{"type":42,"tag":128,"props":2971,"children":2972},{"style":141},[2973],{"type":47,"value":81},{"type":42,"tag":128,"props":2975,"children":2976},{"style":259},[2977],{"type":47,"value":302},{"type":42,"tag":128,"props":2979,"children":2980},{"class":130,"line":305},[2981],{"type":42,"tag":128,"props":2982,"children":2983},{"emptyLinePlaceholder":309},[2984],{"type":47,"value":312},{"type":42,"tag":128,"props":2986,"children":2987},{"class":130,"line":315},[2988],{"type":42,"tag":128,"props":2989,"children":2990},{"style":458},[2991],{"type":47,"value":2992},"\u002F\u002F Check current user (never throws — returns null if not authenticated)\n",{"type":42,"tag":128,"props":2994,"children":2995},{"class":130,"line":386},[2996,3000,3004,3008,3012,3016],{"type":42,"tag":128,"props":2997,"children":2998},{"style":319},[2999],{"type":47,"value":322},{"type":42,"tag":128,"props":3001,"children":3002},{"style":265},[3003],{"type":47,"value":327},{"type":42,"tag":128,"props":3005,"children":3006},{"style":259},[3007],{"type":47,"value":332},{"type":42,"tag":128,"props":3009,"children":3010},{"style":253},[3011],{"type":47,"value":337},{"type":42,"tag":128,"props":3013,"children":3014},{"style":340},[3015],{"type":47,"value":278},{"type":42,"tag":128,"props":3017,"children":3018},{"style":265},[3019],{"type":47,"value":491},{"type":42,"tag":128,"props":3021,"children":3022},{"class":130,"line":446},[3023],{"type":42,"tag":128,"props":3024,"children":3025},{"emptyLinePlaceholder":309},[3026],{"type":47,"value":312},{"type":42,"tag":128,"props":3028,"children":3029},{"class":130,"line":454},[3030],{"type":42,"tag":128,"props":3031,"children":3032},{"style":458},[3033],{"type":47,"value":3034},"\u002F\u002F Subscribe to auth state changes (returns unsubscribe function)\n",{"type":42,"tag":128,"props":3036,"children":3037},{"class":130,"line":464},[3038,3042,3047,3051,3055,3059,3063,3068,3072,3076,3080,3084],{"type":42,"tag":128,"props":3039,"children":3040},{"style":319},[3041],{"type":47,"value":322},{"type":42,"tag":128,"props":3043,"children":3044},{"style":265},[3045],{"type":47,"value":3046}," unsubscribe ",{"type":42,"tag":128,"props":3048,"children":3049},{"style":259},[3050],{"type":47,"value":332},{"type":42,"tag":128,"props":3052,"children":3053},{"style":340},[3054],{"type":47,"value":2948},{"type":42,"tag":128,"props":3056,"children":3057},{"style":265},[3058],{"type":47,"value":347},{"type":42,"tag":128,"props":3060,"children":3061},{"style":259},[3062],{"type":47,"value":347},{"type":42,"tag":128,"props":3064,"children":3065},{"style":621},[3066],{"type":47,"value":3067},"event",{"type":42,"tag":128,"props":3069,"children":3070},{"style":259},[3071],{"type":47,"value":273},{"type":42,"tag":128,"props":3073,"children":3074},{"style":621},[3075],{"type":47,"value":679},{"type":42,"tag":128,"props":3077,"children":3078},{"style":259},[3079],{"type":47,"value":656},{"type":42,"tag":128,"props":3081,"children":3082},{"style":319},[3083],{"type":47,"value":661},{"type":42,"tag":128,"props":3085,"children":3086},{"style":259},[3087],{"type":47,"value":666},{"type":42,"tag":128,"props":3089,"children":3090},{"class":130,"line":789},[3091,3096,3100,3104,3108],{"type":42,"tag":128,"props":3092,"children":3093},{"style":253},[3094],{"type":47,"value":3095},"  switch",{"type":42,"tag":128,"props":3097,"children":3098},{"style":695},[3099],{"type":47,"value":618},{"type":42,"tag":128,"props":3101,"children":3102},{"style":265},[3103],{"type":47,"value":3067},{"type":42,"tag":128,"props":3105,"children":3106},{"style":695},[3107],{"type":47,"value":723},{"type":42,"tag":128,"props":3109,"children":3110},{"style":259},[3111],{"type":47,"value":1307},{"type":42,"tag":128,"props":3113,"children":3114},{"class":130,"line":876},[3115,3120,3124,3128,3133],{"type":42,"tag":128,"props":3116,"children":3117},{"style":253},[3118],{"type":47,"value":3119},"    case",{"type":42,"tag":128,"props":3121,"children":3122},{"style":265},[3123],{"type":47,"value":2957},{"type":42,"tag":128,"props":3125,"children":3126},{"style":259},[3127],{"type":47,"value":83},{"type":42,"tag":128,"props":3129,"children":3130},{"style":265},[3131],{"type":47,"value":3132},"LOGIN",{"type":42,"tag":128,"props":3134,"children":3135},{"style":259},[3136],{"type":47,"value":2484},{"type":42,"tag":128,"props":3138,"children":3139},{"class":130,"line":1011},[3140,3145,3149,3153,3157,3161,3166,3170,3174,3178,3182,3186],{"type":42,"tag":128,"props":3141,"children":3142},{"style":265},[3143],{"type":47,"value":3144},"      console",{"type":42,"tag":128,"props":3146,"children":3147},{"style":259},[3148],{"type":47,"value":83},{"type":42,"tag":128,"props":3150,"children":3151},{"style":340},[3152],{"type":47,"value":401},{"type":42,"tag":128,"props":3154,"children":3155},{"style":695},[3156],{"type":47,"value":347},{"type":42,"tag":128,"props":3158,"children":3159},{"style":259},[3160],{"type":47,"value":352},{"type":42,"tag":128,"props":3162,"children":3163},{"style":141},[3164],{"type":47,"value":3165},"Logged in:",{"type":42,"tag":128,"props":3167,"children":3168},{"style":259},[3169],{"type":47,"value":352},{"type":42,"tag":128,"props":3171,"children":3172},{"style":259},[3173],{"type":47,"value":273},{"type":42,"tag":128,"props":3175,"children":3176},{"style":265},[3177],{"type":47,"value":679},{"type":42,"tag":128,"props":3179,"children":3180},{"style":259},[3181],{"type":47,"value":2526},{"type":42,"tag":128,"props":3183,"children":3184},{"style":265},[3185],{"type":47,"value":865},{"type":42,"tag":128,"props":3187,"children":3188},{"style":695},[3189],{"type":47,"value":383},{"type":42,"tag":128,"props":3191,"children":3192},{"class":130,"line":1426},[3193],{"type":42,"tag":128,"props":3194,"children":3195},{"style":253},[3196],{"type":47,"value":3197},"      break\n",{"type":42,"tag":128,"props":3199,"children":3200},{"class":130,"line":1435},[3201,3205,3209,3213,3218],{"type":42,"tag":128,"props":3202,"children":3203},{"style":253},[3204],{"type":47,"value":3119},{"type":42,"tag":128,"props":3206,"children":3207},{"style":265},[3208],{"type":47,"value":2957},{"type":42,"tag":128,"props":3210,"children":3211},{"style":259},[3212],{"type":47,"value":83},{"type":42,"tag":128,"props":3214,"children":3215},{"style":265},[3216],{"type":47,"value":3217},"LOGOUT",{"type":42,"tag":128,"props":3219,"children":3220},{"style":259},[3221],{"type":47,"value":2484},{"type":42,"tag":128,"props":3223,"children":3224},{"class":130,"line":1801},[3225,3229,3233,3237,3241,3245,3250,3254],{"type":42,"tag":128,"props":3226,"children":3227},{"style":265},[3228],{"type":47,"value":3144},{"type":42,"tag":128,"props":3230,"children":3231},{"style":259},[3232],{"type":47,"value":83},{"type":42,"tag":128,"props":3234,"children":3235},{"style":340},[3236],{"type":47,"value":401},{"type":42,"tag":128,"props":3238,"children":3239},{"style":695},[3240],{"type":47,"value":347},{"type":42,"tag":128,"props":3242,"children":3243},{"style":259},[3244],{"type":47,"value":352},{"type":42,"tag":128,"props":3246,"children":3247},{"style":141},[3248],{"type":47,"value":3249},"Logged out",{"type":42,"tag":128,"props":3251,"children":3252},{"style":259},[3253],{"type":47,"value":352},{"type":42,"tag":128,"props":3255,"children":3256},{"style":695},[3257],{"type":47,"value":383},{"type":42,"tag":128,"props":3259,"children":3260},{"class":130,"line":1829},[3261],{"type":42,"tag":128,"props":3262,"children":3263},{"style":253},[3264],{"type":47,"value":3197},{"type":42,"tag":128,"props":3266,"children":3267},{"class":130,"line":1861},[3268,3272,3276,3280,3285],{"type":42,"tag":128,"props":3269,"children":3270},{"style":253},[3271],{"type":47,"value":3119},{"type":42,"tag":128,"props":3273,"children":3274},{"style":265},[3275],{"type":47,"value":2957},{"type":42,"tag":128,"props":3277,"children":3278},{"style":259},[3279],{"type":47,"value":83},{"type":42,"tag":128,"props":3281,"children":3282},{"style":265},[3283],{"type":47,"value":3284},"TOKEN_REFRESH",{"type":42,"tag":128,"props":3286,"children":3287},{"style":259},[3288],{"type":47,"value":2484},{"type":42,"tag":128,"props":3290,"children":3291},{"class":130,"line":1931},[3292],{"type":42,"tag":128,"props":3293,"children":3294},{"style":253},[3295],{"type":47,"value":3197},{"type":42,"tag":128,"props":3297,"children":3298},{"class":130,"line":1939},[3299,3303,3307,3311,3316],{"type":42,"tag":128,"props":3300,"children":3301},{"style":253},[3302],{"type":47,"value":3119},{"type":42,"tag":128,"props":3304,"children":3305},{"style":265},[3306],{"type":47,"value":2957},{"type":42,"tag":128,"props":3308,"children":3309},{"style":259},[3310],{"type":47,"value":83},{"type":42,"tag":128,"props":3312,"children":3313},{"style":265},[3314],{"type":47,"value":3315},"USER_UPDATED",{"type":42,"tag":128,"props":3317,"children":3318},{"style":259},[3319],{"type":47,"value":2484},{"type":42,"tag":128,"props":3321,"children":3322},{"class":130,"line":1947},[3323,3327,3331,3335,3339,3343,3348,3352,3356,3360,3364,3368],{"type":42,"tag":128,"props":3324,"children":3325},{"style":265},[3326],{"type":47,"value":3144},{"type":42,"tag":128,"props":3328,"children":3329},{"style":259},[3330],{"type":47,"value":83},{"type":42,"tag":128,"props":3332,"children":3333},{"style":340},[3334],{"type":47,"value":401},{"type":42,"tag":128,"props":3336,"children":3337},{"style":695},[3338],{"type":47,"value":347},{"type":42,"tag":128,"props":3340,"children":3341},{"style":259},[3342],{"type":47,"value":352},{"type":42,"tag":128,"props":3344,"children":3345},{"style":141},[3346],{"type":47,"value":3347},"Profile updated:",{"type":42,"tag":128,"props":3349,"children":3350},{"style":259},[3351],{"type":47,"value":352},{"type":42,"tag":128,"props":3353,"children":3354},{"style":259},[3355],{"type":47,"value":273},{"type":42,"tag":128,"props":3357,"children":3358},{"style":265},[3359],{"type":47,"value":679},{"type":42,"tag":128,"props":3361,"children":3362},{"style":259},[3363],{"type":47,"value":2526},{"type":42,"tag":128,"props":3365,"children":3366},{"style":265},[3367],{"type":47,"value":865},{"type":42,"tag":128,"props":3369,"children":3370},{"style":695},[3371],{"type":47,"value":383},{"type":42,"tag":128,"props":3373,"children":3374},{"class":130,"line":2675},[3375],{"type":42,"tag":128,"props":3376,"children":3377},{"style":253},[3378],{"type":47,"value":3197},{"type":42,"tag":128,"props":3380,"children":3381},{"class":130,"line":2700},[3382,3386,3390,3394,3399],{"type":42,"tag":128,"props":3383,"children":3384},{"style":253},[3385],{"type":47,"value":3119},{"type":42,"tag":128,"props":3387,"children":3388},{"style":265},[3389],{"type":47,"value":2957},{"type":42,"tag":128,"props":3391,"children":3392},{"style":259},[3393],{"type":47,"value":83},{"type":42,"tag":128,"props":3395,"children":3396},{"style":265},[3397],{"type":47,"value":3398},"RECOVERY",{"type":42,"tag":128,"props":3400,"children":3401},{"style":259},[3402],{"type":47,"value":2484},{"type":42,"tag":128,"props":3404,"children":3405},{"class":130,"line":2709},[3406,3410,3414,3418,3422,3426,3431,3435],{"type":42,"tag":128,"props":3407,"children":3408},{"style":265},[3409],{"type":47,"value":3144},{"type":42,"tag":128,"props":3411,"children":3412},{"style":259},[3413],{"type":47,"value":83},{"type":42,"tag":128,"props":3415,"children":3416},{"style":340},[3417],{"type":47,"value":401},{"type":42,"tag":128,"props":3419,"children":3420},{"style":695},[3421],{"type":47,"value":347},{"type":42,"tag":128,"props":3423,"children":3424},{"style":259},[3425],{"type":47,"value":352},{"type":42,"tag":128,"props":3427,"children":3428},{"style":141},[3429],{"type":47,"value":3430},"Password recovery initiated",{"type":42,"tag":128,"props":3432,"children":3433},{"style":259},[3434],{"type":47,"value":352},{"type":42,"tag":128,"props":3436,"children":3437},{"style":695},[3438],{"type":47,"value":383},{"type":42,"tag":128,"props":3440,"children":3441},{"class":130,"line":2739},[3442],{"type":42,"tag":128,"props":3443,"children":3444},{"style":253},[3445],{"type":47,"value":3197},{"type":42,"tag":128,"props":3447,"children":3448},{"class":130,"line":2747},[3449],{"type":42,"tag":128,"props":3450,"children":3451},{"style":259},[3452],{"type":47,"value":1432},{"type":42,"tag":128,"props":3454,"children":3455},{"class":130,"line":2772},[3456,3460],{"type":42,"tag":128,"props":3457,"children":3458},{"style":259},[3459],{"type":47,"value":1017},{"type":42,"tag":128,"props":3461,"children":3462},{"style":265},[3463],{"type":47,"value":383},{"type":42,"tag":194,"props":3465,"children":3467},{"id":3466},"settings-driven-ui",[3468],{"type":47,"value":3469},"Settings-Driven UI",{"type":42,"tag":50,"props":3471,"children":3472},{},[3473],{"type":47,"value":3474},"Fetch the project's Identity settings to conditionally render signup forms and OAuth buttons.",{"type":42,"tag":117,"props":3476,"children":3478},{"className":241,"code":3477,"language":243,"meta":122,"style":122},"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",[3479],{"type":42,"tag":76,"props":3480,"children":3481},{"__ignoreMap":122},[3482,3518,3525,3553,3561,3569,3577,3584,3623,3630,3706,3743],{"type":42,"tag":128,"props":3483,"children":3484},{"class":130,"line":131},[3485,3489,3493,3498,3502,3506,3510,3514],{"type":42,"tag":128,"props":3486,"children":3487},{"style":253},[3488],{"type":47,"value":256},{"type":42,"tag":128,"props":3490,"children":3491},{"style":259},[3492],{"type":47,"value":262},{"type":42,"tag":128,"props":3494,"children":3495},{"style":265},[3496],{"type":47,"value":3497}," getSettings",{"type":42,"tag":128,"props":3499,"children":3500},{"style":259},[3501],{"type":47,"value":283},{"type":42,"tag":128,"props":3503,"children":3504},{"style":253},[3505],{"type":47,"value":288},{"type":42,"tag":128,"props":3507,"children":3508},{"style":259},[3509],{"type":47,"value":293},{"type":42,"tag":128,"props":3511,"children":3512},{"style":141},[3513],{"type":47,"value":81},{"type":42,"tag":128,"props":3515,"children":3516},{"style":259},[3517],{"type":47,"value":302},{"type":42,"tag":128,"props":3519,"children":3520},{"class":130,"line":305},[3521],{"type":42,"tag":128,"props":3522,"children":3523},{"emptyLinePlaceholder":309},[3524],{"type":47,"value":312},{"type":42,"tag":128,"props":3526,"children":3527},{"class":130,"line":315},[3528,3532,3537,3541,3545,3549],{"type":42,"tag":128,"props":3529,"children":3530},{"style":319},[3531],{"type":47,"value":322},{"type":42,"tag":128,"props":3533,"children":3534},{"style":265},[3535],{"type":47,"value":3536}," settings ",{"type":42,"tag":128,"props":3538,"children":3539},{"style":259},[3540],{"type":47,"value":332},{"type":42,"tag":128,"props":3542,"children":3543},{"style":253},[3544],{"type":47,"value":337},{"type":42,"tag":128,"props":3546,"children":3547},{"style":340},[3548],{"type":47,"value":3497},{"type":42,"tag":128,"props":3550,"children":3551},{"style":265},[3552],{"type":47,"value":491},{"type":42,"tag":128,"props":3554,"children":3555},{"class":130,"line":386},[3556],{"type":42,"tag":128,"props":3557,"children":3558},{"style":458},[3559],{"type":47,"value":3560},"\u002F\u002F settings.autoconfirm — boolean\n",{"type":42,"tag":128,"props":3562,"children":3563},{"class":130,"line":446},[3564],{"type":42,"tag":128,"props":3565,"children":3566},{"style":458},[3567],{"type":47,"value":3568},"\u002F\u002F settings.disableSignup — boolean\n",{"type":42,"tag":128,"props":3570,"children":3571},{"class":130,"line":454},[3572],{"type":42,"tag":128,"props":3573,"children":3574},{"style":458},[3575],{"type":47,"value":3576},"\u002F\u002F settings.providers — Record\u003CAuthProvider, boolean>\n",{"type":42,"tag":128,"props":3578,"children":3579},{"class":130,"line":464},[3580],{"type":42,"tag":128,"props":3581,"children":3582},{"emptyLinePlaceholder":309},[3583],{"type":47,"value":312},{"type":42,"tag":128,"props":3585,"children":3586},{"class":130,"line":789},[3587,3592,3596,3600,3605,3609,3614,3619],{"type":42,"tag":128,"props":3588,"children":3589},{"style":253},[3590],{"type":47,"value":3591},"if",{"type":42,"tag":128,"props":3593,"children":3594},{"style":265},[3595],{"type":47,"value":618},{"type":42,"tag":128,"props":3597,"children":3598},{"style":259},[3599],{"type":47,"value":714},{"type":42,"tag":128,"props":3601,"children":3602},{"style":265},[3603],{"type":47,"value":3604},"settings",{"type":42,"tag":128,"props":3606,"children":3607},{"style":259},[3608],{"type":47,"value":83},{"type":42,"tag":128,"props":3610,"children":3611},{"style":265},[3612],{"type":47,"value":3613},"disableSignup) ",{"type":42,"tag":128,"props":3615,"children":3616},{"style":340},[3617],{"type":47,"value":3618},"showSignupForm",{"type":42,"tag":128,"props":3620,"children":3621},{"style":265},[3622],{"type":47,"value":491},{"type":42,"tag":128,"props":3624,"children":3625},{"class":130,"line":876},[3626],{"type":42,"tag":128,"props":3627,"children":3628},{"emptyLinePlaceholder":309},[3629],{"type":47,"value":312},{"type":42,"tag":128,"props":3631,"children":3632},{"class":130,"line":1011},[3633,3638,3642,3646,3651,3655,3659,3664,3669,3674,3679,3683,3688,3693,3697,3702],{"type":42,"tag":128,"props":3634,"children":3635},{"style":253},[3636],{"type":47,"value":3637},"for",{"type":42,"tag":128,"props":3639,"children":3640},{"style":265},[3641],{"type":47,"value":618},{"type":42,"tag":128,"props":3643,"children":3644},{"style":319},[3645],{"type":47,"value":322},{"type":42,"tag":128,"props":3647,"children":3648},{"style":259},[3649],{"type":47,"value":3650}," [",{"type":42,"tag":128,"props":3652,"children":3653},{"style":265},[3654],{"type":47,"value":2131},{"type":42,"tag":128,"props":3656,"children":3657},{"style":259},[3658],{"type":47,"value":273},{"type":42,"tag":128,"props":3660,"children":3661},{"style":265},[3662],{"type":47,"value":3663}," enabled",{"type":42,"tag":128,"props":3665,"children":3666},{"style":259},[3667],{"type":47,"value":3668},"]",{"type":42,"tag":128,"props":3670,"children":3671},{"style":259},[3672],{"type":47,"value":3673}," of",{"type":42,"tag":128,"props":3675,"children":3676},{"style":265},[3677],{"type":47,"value":3678}," Object",{"type":42,"tag":128,"props":3680,"children":3681},{"style":259},[3682],{"type":47,"value":83},{"type":42,"tag":128,"props":3684,"children":3685},{"style":340},[3686],{"type":47,"value":3687},"entries",{"type":42,"tag":128,"props":3689,"children":3690},{"style":265},[3691],{"type":47,"value":3692},"(settings",{"type":42,"tag":128,"props":3694,"children":3695},{"style":259},[3696],{"type":47,"value":83},{"type":42,"tag":128,"props":3698,"children":3699},{"style":265},[3700],{"type":47,"value":3701},"providers)) ",{"type":42,"tag":128,"props":3703,"children":3704},{"style":259},[3705],{"type":47,"value":1307},{"type":42,"tag":128,"props":3707,"children":3708},{"class":130,"line":1426},[3709,3713,3717,3722,3726,3731,3735,3739],{"type":42,"tag":128,"props":3710,"children":3711},{"style":253},[3712],{"type":47,"value":705},{"type":42,"tag":128,"props":3714,"children":3715},{"style":695},[3716],{"type":47,"value":618},{"type":42,"tag":128,"props":3718,"children":3719},{"style":265},[3720],{"type":47,"value":3721},"enabled",{"type":42,"tag":128,"props":3723,"children":3724},{"style":695},[3725],{"type":47,"value":723},{"type":42,"tag":128,"props":3727,"children":3728},{"style":340},[3729],{"type":47,"value":3730},"showOAuthButton",{"type":42,"tag":128,"props":3732,"children":3733},{"style":695},[3734],{"type":47,"value":347},{"type":42,"tag":128,"props":3736,"children":3737},{"style":265},[3738],{"type":47,"value":2131},{"type":42,"tag":128,"props":3740,"children":3741},{"style":695},[3742],{"type":47,"value":383},{"type":42,"tag":128,"props":3744,"children":3745},{"class":130,"line":1435},[3746],{"type":42,"tag":128,"props":3747,"children":3748},{"style":259},[3749],{"type":47,"value":882},{"type":42,"tag":110,"props":3751,"children":3753},{"id":3752},"minimal-react-example",[3754],{"type":47,"value":3755},"Minimal React Example",{"type":42,"tag":117,"props":3757,"children":3761},{"className":3758,"code":3759,"language":3760,"meta":122,"style":122},"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",[3762],{"type":42,"tag":76,"props":3763,"children":3764},{"__ignoreMap":122},[3765,3811,3822,3833,3844,3855,3866,3877,3888,3911,3918,3938,3987,4038,4045,4069,4098,4114,4139,4160,4172,4232,4245,4252,4299,4342,4362,4369,4376,4424,4431,4464,4481,4501,4509,4517,4574,4583],{"type":42,"tag":128,"props":3766,"children":3767},{"class":130,"line":131},[3768,3772,3776,3781,3785,3790,3794,3798,3802,3807],{"type":42,"tag":128,"props":3769,"children":3770},{"style":253},[3771],{"type":47,"value":256},{"type":42,"tag":128,"props":3773,"children":3774},{"style":259},[3775],{"type":47,"value":262},{"type":42,"tag":128,"props":3777,"children":3778},{"style":265},[3779],{"type":47,"value":3780}," useEffect",{"type":42,"tag":128,"props":3782,"children":3783},{"style":259},[3784],{"type":47,"value":273},{"type":42,"tag":128,"props":3786,"children":3787},{"style":265},[3788],{"type":47,"value":3789}," useState",{"type":42,"tag":128,"props":3791,"children":3792},{"style":259},[3793],{"type":47,"value":283},{"type":42,"tag":128,"props":3795,"children":3796},{"style":253},[3797],{"type":47,"value":288},{"type":42,"tag":128,"props":3799,"children":3800},{"style":259},[3801],{"type":47,"value":293},{"type":42,"tag":128,"props":3803,"children":3804},{"style":141},[3805],{"type":47,"value":3806},"react",{"type":42,"tag":128,"props":3808,"children":3809},{"style":259},[3810],{"type":47,"value":302},{"type":42,"tag":128,"props":3812,"children":3813},{"class":130,"line":305},[3814,3818],{"type":42,"tag":128,"props":3815,"children":3816},{"style":253},[3817],{"type":47,"value":256},{"type":42,"tag":128,"props":3819,"children":3820},{"style":259},[3821],{"type":47,"value":666},{"type":42,"tag":128,"props":3823,"children":3824},{"class":130,"line":315},[3825,3829],{"type":42,"tag":128,"props":3826,"children":3827},{"style":265},[3828],{"type":47,"value":919},{"type":42,"tag":128,"props":3830,"children":3831},{"style":259},[3832],{"type":47,"value":924},{"type":42,"tag":128,"props":3834,"children":3835},{"class":130,"line":386},[3836,3840],{"type":42,"tag":128,"props":3837,"children":3838},{"style":265},[3839],{"type":47,"value":932},{"type":42,"tag":128,"props":3841,"children":3842},{"style":259},[3843],{"type":47,"value":924},{"type":42,"tag":128,"props":3845,"children":3846},{"class":130,"line":446},[3847,3851],{"type":42,"tag":128,"props":3848,"children":3849},{"style":265},[3850],{"type":47,"value":944},{"type":42,"tag":128,"props":3852,"children":3853},{"style":259},[3854],{"type":47,"value":924},{"type":42,"tag":128,"props":3856,"children":3857},{"class":130,"line":454},[3858,3862],{"type":42,"tag":128,"props":3859,"children":3860},{"style":265},[3861],{"type":47,"value":956},{"type":42,"tag":128,"props":3863,"children":3864},{"style":259},[3865],{"type":47,"value":924},{"type":42,"tag":128,"props":3867,"children":3868},{"class":130,"line":464},[3869,3873],{"type":42,"tag":128,"props":3870,"children":3871},{"style":265},[3872],{"type":47,"value":980},{"type":42,"tag":128,"props":3874,"children":3875},{"style":259},[3876],{"type":47,"value":924},{"type":42,"tag":128,"props":3878,"children":3879},{"class":130,"line":789},[3880,3884],{"type":42,"tag":128,"props":3881,"children":3882},{"style":265},[3883],{"type":47,"value":992},{"type":42,"tag":128,"props":3885,"children":3886},{"style":259},[3887],{"type":47,"value":924},{"type":42,"tag":128,"props":3889,"children":3890},{"class":130,"line":876},[3891,3895,3899,3903,3907],{"type":42,"tag":128,"props":3892,"children":3893},{"style":259},[3894],{"type":47,"value":1017},{"type":42,"tag":128,"props":3896,"children":3897},{"style":253},[3898],{"type":47,"value":288},{"type":42,"tag":128,"props":3900,"children":3901},{"style":259},[3902],{"type":47,"value":293},{"type":42,"tag":128,"props":3904,"children":3905},{"style":141},[3906],{"type":47,"value":81},{"type":42,"tag":128,"props":3908,"children":3909},{"style":259},[3910],{"type":47,"value":302},{"type":42,"tag":128,"props":3912,"children":3913},{"class":130,"line":1011},[3914],{"type":42,"tag":128,"props":3915,"children":3916},{"emptyLinePlaceholder":309},[3917],{"type":47,"value":312},{"type":42,"tag":128,"props":3919,"children":3920},{"class":130,"line":1426},[3921,3925,3930,3934],{"type":42,"tag":128,"props":3922,"children":3923},{"style":319},[3924],{"type":47,"value":2117},{"type":42,"tag":128,"props":3926,"children":3927},{"style":340},[3928],{"type":47,"value":3929}," App",{"type":42,"tag":128,"props":3931,"children":3932},{"style":259},[3933],{"type":47,"value":2343},{"type":42,"tag":128,"props":3935,"children":3936},{"style":259},[3937],{"type":47,"value":666},{"type":42,"tag":128,"props":3939,"children":3940},{"class":130,"line":1435},[3941,3945,3949,3953,3957,3962,3966,3970,3974,3978,3983],{"type":42,"tag":128,"props":3942,"children":3943},{"style":319},[3944],{"type":47,"value":674},{"type":42,"tag":128,"props":3946,"children":3947},{"style":259},[3948],{"type":47,"value":3650},{"type":42,"tag":128,"props":3950,"children":3951},{"style":265},[3952],{"type":47,"value":425},{"type":42,"tag":128,"props":3954,"children":3955},{"style":259},[3956],{"type":47,"value":273},{"type":42,"tag":128,"props":3958,"children":3959},{"style":265},[3960],{"type":47,"value":3961}," setUser",{"type":42,"tag":128,"props":3963,"children":3964},{"style":259},[3965],{"type":47,"value":3668},{"type":42,"tag":128,"props":3967,"children":3968},{"style":259},[3969],{"type":47,"value":684},{"type":42,"tag":128,"props":3971,"children":3972},{"style":340},[3973],{"type":47,"value":3789},{"type":42,"tag":128,"props":3975,"children":3976},{"style":695},[3977],{"type":47,"value":347},{"type":42,"tag":128,"props":3979,"children":3980},{"style":259},[3981],{"type":47,"value":3982},"null",{"type":42,"tag":128,"props":3984,"children":3985},{"style":695},[3986],{"type":47,"value":383},{"type":42,"tag":128,"props":3988,"children":3989},{"class":130,"line":1801},[3990,3994,3998,4003,4007,4012,4016,4020,4024,4028,4034],{"type":42,"tag":128,"props":3991,"children":3992},{"style":319},[3993],{"type":47,"value":674},{"type":42,"tag":128,"props":3995,"children":3996},{"style":259},[3997],{"type":47,"value":3650},{"type":42,"tag":128,"props":3999,"children":4000},{"style":265},[4001],{"type":47,"value":4002},"loading",{"type":42,"tag":128,"props":4004,"children":4005},{"style":259},[4006],{"type":47,"value":273},{"type":42,"tag":128,"props":4008,"children":4009},{"style":265},[4010],{"type":47,"value":4011}," setLoading",{"type":42,"tag":128,"props":4013,"children":4014},{"style":259},[4015],{"type":47,"value":3668},{"type":42,"tag":128,"props":4017,"children":4018},{"style":259},[4019],{"type":47,"value":684},{"type":42,"tag":128,"props":4021,"children":4022},{"style":340},[4023],{"type":47,"value":3789},{"type":42,"tag":128,"props":4025,"children":4026},{"style":695},[4027],{"type":47,"value":347},{"type":42,"tag":128,"props":4029,"children":4031},{"style":4030},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4032],{"type":47,"value":4033},"true",{"type":42,"tag":128,"props":4035,"children":4036},{"style":695},[4037],{"type":47,"value":383},{"type":42,"tag":128,"props":4039,"children":4040},{"class":130,"line":1829},[4041],{"type":42,"tag":128,"props":4042,"children":4043},{"emptyLinePlaceholder":309},[4044],{"type":47,"value":312},{"type":42,"tag":128,"props":4046,"children":4047},{"class":130,"line":1861},[4048,4053,4057,4061,4065],{"type":42,"tag":128,"props":4049,"children":4050},{"style":340},[4051],{"type":47,"value":4052},"  useEffect",{"type":42,"tag":128,"props":4054,"children":4055},{"style":695},[4056],{"type":47,"value":347},{"type":42,"tag":128,"props":4058,"children":4059},{"style":259},[4060],{"type":47,"value":2343},{"type":42,"tag":128,"props":4062,"children":4063},{"style":319},[4064],{"type":47,"value":661},{"type":42,"tag":128,"props":4066,"children":4067},{"style":259},[4068],{"type":47,"value":666},{"type":42,"tag":128,"props":4070,"children":4071},{"class":130,"line":1931},[4072,4077,4081,4085,4090,4094],{"type":42,"tag":128,"props":4073,"children":4074},{"style":259},[4075],{"type":47,"value":4076},"    ;",{"type":42,"tag":128,"props":4078,"children":4079},{"style":695},[4080],{"type":47,"value":347},{"type":42,"tag":128,"props":4082,"children":4083},{"style":319},[4084],{"type":47,"value":1105},{"type":42,"tag":128,"props":4086,"children":4087},{"style":259},[4088],{"type":47,"value":4089}," ()",{"type":42,"tag":128,"props":4091,"children":4092},{"style":319},[4093],{"type":47,"value":661},{"type":42,"tag":128,"props":4095,"children":4096},{"style":259},[4097],{"type":47,"value":666},{"type":42,"tag":128,"props":4099,"children":4100},{"class":130,"line":1939},[4101,4106,4110],{"type":42,"tag":128,"props":4102,"children":4103},{"style":253},[4104],{"type":47,"value":4105},"      await",{"type":42,"tag":128,"props":4107,"children":4108},{"style":340},[4109],{"type":47,"value":2287},{"type":42,"tag":128,"props":4111,"children":4112},{"style":695},[4113],{"type":47,"value":491},{"type":42,"tag":128,"props":4115,"children":4116},{"class":130,"line":1947},[4117,4122,4126,4130,4134],{"type":42,"tag":128,"props":4118,"children":4119},{"style":340},[4120],{"type":47,"value":4121},"      setUser",{"type":42,"tag":128,"props":4123,"children":4124},{"style":695},[4125],{"type":47,"value":347},{"type":42,"tag":128,"props":4127,"children":4128},{"style":253},[4129],{"type":47,"value":2016},{"type":42,"tag":128,"props":4131,"children":4132},{"style":340},[4133],{"type":47,"value":278},{"type":42,"tag":128,"props":4135,"children":4136},{"style":695},[4137],{"type":47,"value":4138},"())\n",{"type":42,"tag":128,"props":4140,"children":4141},{"class":130,"line":2675},[4142,4147,4151,4156],{"type":42,"tag":128,"props":4143,"children":4144},{"style":340},[4145],{"type":47,"value":4146},"      setLoading",{"type":42,"tag":128,"props":4148,"children":4149},{"style":695},[4150],{"type":47,"value":347},{"type":42,"tag":128,"props":4152,"children":4153},{"style":4030},[4154],{"type":47,"value":4155},"false",{"type":42,"tag":128,"props":4157,"children":4158},{"style":695},[4159],{"type":47,"value":383},{"type":42,"tag":128,"props":4161,"children":4162},{"class":130,"line":2700},[4163,4167],{"type":42,"tag":128,"props":4164,"children":4165},{"style":259},[4166],{"type":47,"value":1746},{"type":42,"tag":128,"props":4168,"children":4169},{"style":695},[4170],{"type":47,"value":4171},")()\n",{"type":42,"tag":128,"props":4173,"children":4174},{"class":130,"line":2709},[4175,4180,4184,4188,4192,4197,4201,4206,4210,4214,4218,4222,4227],{"type":42,"tag":128,"props":4176,"children":4177},{"style":253},[4178],{"type":47,"value":4179},"    return",{"type":42,"tag":128,"props":4181,"children":4182},{"style":340},[4183],{"type":47,"value":2948},{"type":42,"tag":128,"props":4185,"children":4186},{"style":695},[4187],{"type":47,"value":347},{"type":42,"tag":128,"props":4189,"children":4190},{"style":259},[4191],{"type":47,"value":347},{"type":42,"tag":128,"props":4193,"children":4194},{"style":621},[4195],{"type":47,"value":4196},"_event",{"type":42,"tag":128,"props":4198,"children":4199},{"style":259},[4200],{"type":47,"value":273},{"type":42,"tag":128,"props":4202,"children":4203},{"style":621},[4204],{"type":47,"value":4205}," currentUser",{"type":42,"tag":128,"props":4207,"children":4208},{"style":259},[4209],{"type":47,"value":656},{"type":42,"tag":128,"props":4211,"children":4212},{"style":319},[4213],{"type":47,"value":661},{"type":42,"tag":128,"props":4215,"children":4216},{"style":340},[4217],{"type":47,"value":3961},{"type":42,"tag":128,"props":4219,"children":4220},{"style":695},[4221],{"type":47,"value":347},{"type":42,"tag":128,"props":4223,"children":4224},{"style":265},[4225],{"type":47,"value":4226},"currentUser",{"type":42,"tag":128,"props":4228,"children":4229},{"style":695},[4230],{"type":47,"value":4231},"))\n",{"type":42,"tag":128,"props":4233,"children":4234},{"class":130,"line":2739},[4235,4240],{"type":42,"tag":128,"props":4236,"children":4237},{"style":259},[4238],{"type":47,"value":4239},"  },",{"type":42,"tag":128,"props":4241,"children":4242},{"style":695},[4243],{"type":47,"value":4244}," [])\n",{"type":42,"tag":128,"props":4246,"children":4247},{"class":130,"line":2747},[4248],{"type":42,"tag":128,"props":4249,"children":4250},{"emptyLinePlaceholder":309},[4251],{"type":47,"value":312},{"type":42,"tag":128,"props":4253,"children":4254},{"class":130,"line":2772},[4255,4259,4263,4267,4271,4275,4279,4283,4287,4291,4295],{"type":42,"tag":128,"props":4256,"children":4257},{"style":319},[4258],{"type":47,"value":674},{"type":42,"tag":128,"props":4260,"children":4261},{"style":265},[4262],{"type":47,"value":1115},{"type":42,"tag":128,"props":4264,"children":4265},{"style":259},[4266],{"type":47,"value":684},{"type":42,"tag":128,"props":4268,"children":4269},{"style":319},[4270],{"type":47,"value":613},{"type":42,"tag":128,"props":4272,"children":4273},{"style":259},[4274],{"type":47,"value":618},{"type":42,"tag":128,"props":4276,"children":4277},{"style":621},[4278],{"type":47,"value":865},{"type":42,"tag":128,"props":4280,"children":4281},{"style":259},[4282],{"type":47,"value":273},{"type":42,"tag":128,"props":4284,"children":4285},{"style":621},[4286],{"type":47,"value":1141},{"type":42,"tag":128,"props":4288,"children":4289},{"style":259},[4290],{"type":47,"value":656},{"type":42,"tag":128,"props":4292,"children":4293},{"style":319},[4294],{"type":47,"value":661},{"type":42,"tag":128,"props":4296,"children":4297},{"style":259},[4298],{"type":47,"value":666},{"type":42,"tag":128,"props":4300,"children":4301},{"class":130,"line":2801},[4302,4306,4310,4314,4318,4322,4326,4330,4334,4338],{"type":42,"tag":128,"props":4303,"children":4304},{"style":319},[4305],{"type":47,"value":1177},{"type":42,"tag":128,"props":4307,"children":4308},{"style":265},[4309],{"type":47,"value":4205},{"type":42,"tag":128,"props":4311,"children":4312},{"style":259},[4313],{"type":47,"value":684},{"type":42,"tag":128,"props":4315,"children":4316},{"style":253},[4317],{"type":47,"value":337},{"type":42,"tag":128,"props":4319,"children":4320},{"style":340},[4321],{"type":47,"value":268},{"type":42,"tag":128,"props":4323,"children":4324},{"style":695},[4325],{"type":47,"value":347},{"type":42,"tag":128,"props":4327,"children":4328},{"style":265},[4329],{"type":47,"value":865},{"type":42,"tag":128,"props":4331,"children":4332},{"style":259},[4333],{"type":47,"value":273},{"type":42,"tag":128,"props":4335,"children":4336},{"style":265},[4337],{"type":47,"value":1141},{"type":42,"tag":128,"props":4339,"children":4340},{"style":695},[4341],{"type":47,"value":383},{"type":42,"tag":128,"props":4343,"children":4344},{"class":130,"line":2809},[4345,4350,4354,4358],{"type":42,"tag":128,"props":4346,"children":4347},{"style":340},[4348],{"type":47,"value":4349},"    setUser",{"type":42,"tag":128,"props":4351,"children":4352},{"style":695},[4353],{"type":47,"value":347},{"type":42,"tag":128,"props":4355,"children":4356},{"style":265},[4357],{"type":47,"value":4226},{"type":42,"tag":128,"props":4359,"children":4360},{"style":695},[4361],{"type":47,"value":383},{"type":42,"tag":128,"props":4363,"children":4364},{"class":130,"line":2817},[4365],{"type":42,"tag":128,"props":4366,"children":4367},{"style":259},[4368],{"type":47,"value":1432},{"type":42,"tag":128,"props":4370,"children":4371},{"class":130,"line":2845},[4372],{"type":42,"tag":128,"props":4373,"children":4374},{"emptyLinePlaceholder":309},[4375],{"type":47,"value":312},{"type":42,"tag":128,"props":4377,"children":4378},{"class":130,"line":2898},[4379,4383,4388,4392,4396,4400,4404,4408,4412,4416,4420],{"type":42,"tag":128,"props":4380,"children":4381},{"style":319},[4382],{"type":47,"value":674},{"type":42,"tag":128,"props":4384,"children":4385},{"style":265},[4386],{"type":47,"value":4387}," handleGoogleLogin",{"type":42,"tag":128,"props":4389,"children":4390},{"style":259},[4391],{"type":47,"value":684},{"type":42,"tag":128,"props":4393,"children":4394},{"style":259},[4395],{"type":47,"value":4089},{"type":42,"tag":128,"props":4397,"children":4398},{"style":319},[4399],{"type":47,"value":661},{"type":42,"tag":128,"props":4401,"children":4402},{"style":340},[4403],{"type":47,"value":2074},{"type":42,"tag":128,"props":4405,"children":4406},{"style":695},[4407],{"type":47,"value":347},{"type":42,"tag":128,"props":4409,"children":4410},{"style":259},[4411],{"type":47,"value":352},{"type":42,"tag":128,"props":4413,"children":4414},{"style":141},[4415],{"type":47,"value":2144},{"type":42,"tag":128,"props":4417,"children":4418},{"style":259},[4419],{"type":47,"value":352},{"type":42,"tag":128,"props":4421,"children":4422},{"style":695},[4423],{"type":47,"value":383},{"type":42,"tag":128,"props":4425,"children":4426},{"class":130,"line":2906},[4427],{"type":42,"tag":128,"props":4428,"children":4429},{"emptyLinePlaceholder":309},[4430],{"type":47,"value":312},{"type":42,"tag":128,"props":4432,"children":4434},{"class":130,"line":4433},31,[4435,4439,4444,4448,4452,4456,4460],{"type":42,"tag":128,"props":4436,"children":4437},{"style":319},[4438],{"type":47,"value":674},{"type":42,"tag":128,"props":4440,"children":4441},{"style":265},[4442],{"type":47,"value":4443}," handleSignOut",{"type":42,"tag":128,"props":4445,"children":4446},{"style":259},[4447],{"type":47,"value":684},{"type":42,"tag":128,"props":4449,"children":4450},{"style":319},[4451],{"type":47,"value":613},{"type":42,"tag":128,"props":4453,"children":4454},{"style":259},[4455],{"type":47,"value":4089},{"type":42,"tag":128,"props":4457,"children":4458},{"style":319},[4459],{"type":47,"value":661},{"type":42,"tag":128,"props":4461,"children":4462},{"style":259},[4463],{"type":47,"value":666},{"type":42,"tag":128,"props":4465,"children":4467},{"class":130,"line":4466},32,[4468,4473,4477],{"type":42,"tag":128,"props":4469,"children":4470},{"style":253},[4471],{"type":47,"value":4472},"    await",{"type":42,"tag":128,"props":4474,"children":4475},{"style":340},[4476],{"type":47,"value":1981},{"type":42,"tag":128,"props":4478,"children":4479},{"style":695},[4480],{"type":47,"value":491},{"type":42,"tag":128,"props":4482,"children":4484},{"class":130,"line":4483},33,[4485,4489,4493,4497],{"type":42,"tag":128,"props":4486,"children":4487},{"style":340},[4488],{"type":47,"value":4349},{"type":42,"tag":128,"props":4490,"children":4491},{"style":695},[4492],{"type":47,"value":347},{"type":42,"tag":128,"props":4494,"children":4495},{"style":259},[4496],{"type":47,"value":3982},{"type":42,"tag":128,"props":4498,"children":4499},{"style":695},[4500],{"type":47,"value":383},{"type":42,"tag":128,"props":4502,"children":4504},{"class":130,"line":4503},34,[4505],{"type":42,"tag":128,"props":4506,"children":4507},{"style":259},[4508],{"type":47,"value":1432},{"type":42,"tag":128,"props":4510,"children":4512},{"class":130,"line":4511},35,[4513],{"type":42,"tag":128,"props":4514,"children":4515},{"emptyLinePlaceholder":309},[4516],{"type":47,"value":312},{"type":42,"tag":128,"props":4518,"children":4520},{"class":130,"line":4519},36,[4521,4525,4529,4533,4537,4541,4546,4550,4555,4560,4565,4569],{"type":42,"tag":128,"props":4522,"children":4523},{"style":253},[4524],{"type":47,"value":705},{"type":42,"tag":128,"props":4526,"children":4527},{"style":695},[4528],{"type":47,"value":618},{"type":42,"tag":128,"props":4530,"children":4531},{"style":265},[4532],{"type":47,"value":4002},{"type":42,"tag":128,"props":4534,"children":4535},{"style":695},[4536],{"type":47,"value":723},{"type":42,"tag":128,"props":4538,"children":4539},{"style":253},[4540],{"type":47,"value":728},{"type":42,"tag":128,"props":4542,"children":4543},{"style":259},[4544],{"type":47,"value":4545}," \u003C",{"type":42,"tag":128,"props":4547,"children":4548},{"style":695},[4549],{"type":47,"value":50},{"type":42,"tag":128,"props":4551,"children":4552},{"style":259},[4553],{"type":47,"value":4554},">",{"type":42,"tag":128,"props":4556,"children":4557},{"style":265},[4558],{"type":47,"value":4559},"Loading...",{"type":42,"tag":128,"props":4561,"children":4562},{"style":259},[4563],{"type":47,"value":4564},"\u003C\u002F",{"type":42,"tag":128,"props":4566,"children":4567},{"style":695},[4568],{"type":47,"value":50},{"type":42,"tag":128,"props":4570,"children":4571},{"style":259},[4572],{"type":47,"value":4573},">\n",{"type":42,"tag":128,"props":4575,"children":4577},{"class":130,"line":4576},37,[4578],{"type":42,"tag":128,"props":4579,"children":4580},{"style":458},[4581],{"type":47,"value":4582},"  \u002F\u002F Render login form or user details based on `user` state\n",{"type":42,"tag":128,"props":4584,"children":4586},{"class":130,"line":4585},38,[4587],{"type":42,"tag":128,"props":4588,"children":4589},{"style":259},[4590],{"type":47,"value":882},{"type":42,"tag":110,"props":4592,"children":4594},{"id":4593},"error-handling",[4595],{"type":47,"value":4596},"Error Handling",{"type":42,"tag":50,"props":4598,"children":4599},{},[4600,4605],{"type":42,"tag":76,"props":4601,"children":4603},{"className":4602},[],[4604],{"type":47,"value":81},{"type":47,"value":4606}," throws two error classes:",{"type":42,"tag":156,"props":4608,"children":4609},{},[4610,4645],{"type":42,"tag":160,"props":4611,"children":4612},{},[4613,4622,4624,4629,4631,4636,4638,4644],{"type":42,"tag":70,"props":4614,"children":4615},{},[4616],{"type":42,"tag":76,"props":4617,"children":4619},{"className":4618},[],[4620],{"type":47,"value":4621},"AuthError",{"type":47,"value":4623}," — Thrown by auth operations. Has ",{"type":42,"tag":76,"props":4625,"children":4627},{"className":4626},[],[4628],{"type":47,"value":1411},{"type":47,"value":4630},", optional ",{"type":42,"tag":76,"props":4632,"children":4634},{"className":4633},[],[4635],{"type":47,"value":1365},{"type":47,"value":4637}," (HTTP status code), and optional ",{"type":42,"tag":76,"props":4639,"children":4641},{"className":4640},[],[4642],{"type":47,"value":4643},"cause",{"type":47,"value":83},{"type":42,"tag":160,"props":4646,"children":4647},{},[4648,4657],{"type":42,"tag":70,"props":4649,"children":4650},{},[4651],{"type":42,"tag":76,"props":4652,"children":4654},{"className":4653},[],[4655],{"type":47,"value":4656},"MissingIdentityError",{"type":47,"value":4658}," — Thrown when Identity is not configured in the current environment.",{"type":42,"tag":50,"props":4660,"children":4661},{},[4662,4668,4670,4676,4678,4683,4684,4689],{"type":42,"tag":76,"props":4663,"children":4665},{"className":4664},[],[4666],{"type":47,"value":4667},"getUser()",{"type":47,"value":4669}," and ",{"type":42,"tag":76,"props":4671,"children":4673},{"className":4672},[],[4674],{"type":47,"value":4675},"isAuthenticated()",{"type":47,"value":4677}," never throw — they return ",{"type":42,"tag":76,"props":4679,"children":4681},{"className":4680},[],[4682],{"type":47,"value":3982},{"type":47,"value":4669},{"type":42,"tag":76,"props":4685,"children":4687},{"className":4686},[],[4688],{"type":47,"value":4155},{"type":47,"value":4690}," respectively on failure.",{"type":42,"tag":4692,"props":4693,"children":4694},"table",{},[4695,4714],{"type":42,"tag":4696,"props":4697,"children":4698},"thead",{},[4699],{"type":42,"tag":4700,"props":4701,"children":4702},"tr",{},[4703,4709],{"type":42,"tag":4704,"props":4705,"children":4706},"th",{},[4707],{"type":47,"value":4708},"Status",{"type":42,"tag":4704,"props":4710,"children":4711},{},[4712],{"type":47,"value":4713},"Meaning",{"type":42,"tag":4715,"props":4716,"children":4717},"tbody",{},[4718,4732,4745,4758],{"type":42,"tag":4700,"props":4719,"children":4720},{},[4721,4727],{"type":42,"tag":4722,"props":4723,"children":4724},"td",{},[4725],{"type":47,"value":4726},"401",{"type":42,"tag":4722,"props":4728,"children":4729},{},[4730],{"type":47,"value":4731},"Invalid credentials or expired token",{"type":42,"tag":4700,"props":4733,"children":4734},{},[4735,4740],{"type":42,"tag":4722,"props":4736,"children":4737},{},[4738],{"type":47,"value":4739},"403",{"type":42,"tag":4722,"props":4741,"children":4742},{},[4743],{"type":47,"value":4744},"Action not allowed (e.g., signups disabled)",{"type":42,"tag":4700,"props":4746,"children":4747},{},[4748,4753],{"type":42,"tag":4722,"props":4749,"children":4750},{},[4751],{"type":47,"value":4752},"422",{"type":42,"tag":4722,"props":4754,"children":4755},{},[4756],{"type":47,"value":4757},"Validation error (e.g., weak password, malformed email)",{"type":42,"tag":4700,"props":4759,"children":4760},{},[4761,4766],{"type":42,"tag":4722,"props":4762,"children":4763},{},[4764],{"type":47,"value":4765},"404",{"type":42,"tag":4722,"props":4767,"children":4768},{},[4769],{"type":47,"value":4770},"User or resource not found",{"type":42,"tag":110,"props":4772,"children":4774},{"id":4773},"identity-event-functions",[4775],{"type":47,"value":4776},"Identity Event Functions",{"type":42,"tag":50,"props":4778,"children":4779},{},[4780,4782,4795],{"type":47,"value":4781},"Special serverless functions that trigger on Identity lifecycle events. These use the ",{"type":42,"tag":70,"props":4783,"children":4784},{},[4785,4787,4793],{"type":47,"value":4786},"legacy named ",{"type":42,"tag":76,"props":4788,"children":4790},{"className":4789},[],[4791],{"type":47,"value":4792},"handler",{"type":47,"value":4794}," export",{"type":47,"value":4796}," (not the modern default export).",{"type":42,"tag":50,"props":4798,"children":4799},{},[4800,4805,4807,4813,4815,4821,4822],{"type":42,"tag":70,"props":4801,"children":4802},{},[4803],{"type":47,"value":4804},"Event names:",{"type":47,"value":4806}," ",{"type":42,"tag":76,"props":4808,"children":4810},{"className":4809},[],[4811],{"type":47,"value":4812},"identity-validate",{"type":47,"value":4814},", ",{"type":42,"tag":76,"props":4816,"children":4818},{"className":4817},[],[4819],{"type":47,"value":4820},"identity-signup",{"type":47,"value":4814},{"type":42,"tag":76,"props":4823,"children":4825},{"className":4824},[],[4826],{"type":47,"value":4827},"identity-login",{"type":42,"tag":117,"props":4829,"children":4831},{"className":241,"code":4830,"language":243,"meta":122,"style":122},"\u002F\u002F netlify\u002Ffunctions\u002Fidentity-signup.mts\nimport type { Handler, HandlerEvent, HandlerContext } from '@netlify\u002Ffunctions'\n\nconst handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {\n  const { user } = JSON.parse(event.body || '{}')\n\n  return {\n    statusCode: 200,\n    body: JSON.stringify({\n      app_metadata: {\n        ...user.app_metadata,\n        roles: ['member'],\n      },\n    }),\n  }\n}\n\nexport { handler }\n",[4832],{"type":42,"tag":76,"props":4833,"children":4834},{"__ignoreMap":122},[4835,4843,4901,4908,4980,5056,5063,5074,5095,5128,5144,5169,5206,5214,5229,5236,5243,5250],{"type":42,"tag":128,"props":4836,"children":4837},{"class":130,"line":131},[4838],{"type":42,"tag":128,"props":4839,"children":4840},{"style":458},[4841],{"type":47,"value":4842},"\u002F\u002F netlify\u002Ffunctions\u002Fidentity-signup.mts\n",{"type":42,"tag":128,"props":4844,"children":4845},{"class":130,"line":305},[4846,4850,4854,4858,4863,4867,4872,4876,4881,4885,4889,4893,4897],{"type":42,"tag":128,"props":4847,"children":4848},{"style":253},[4849],{"type":47,"value":256},{"type":42,"tag":128,"props":4851,"children":4852},{"style":253},[4853],{"type":47,"value":558},{"type":42,"tag":128,"props":4855,"children":4856},{"style":259},[4857],{"type":47,"value":262},{"type":42,"tag":128,"props":4859,"children":4860},{"style":265},[4861],{"type":47,"value":4862}," Handler",{"type":42,"tag":128,"props":4864,"children":4865},{"style":259},[4866],{"type":47,"value":273},{"type":42,"tag":128,"props":4868,"children":4869},{"style":265},[4870],{"type":47,"value":4871}," HandlerEvent",{"type":42,"tag":128,"props":4873,"children":4874},{"style":259},[4875],{"type":47,"value":273},{"type":42,"tag":128,"props":4877,"children":4878},{"style":265},[4879],{"type":47,"value":4880}," HandlerContext",{"type":42,"tag":128,"props":4882,"children":4883},{"style":259},[4884],{"type":47,"value":283},{"type":42,"tag":128,"props":4886,"children":4887},{"style":253},[4888],{"type":47,"value":288},{"type":42,"tag":128,"props":4890,"children":4891},{"style":259},[4892],{"type":47,"value":293},{"type":42,"tag":128,"props":4894,"children":4895},{"style":141},[4896],{"type":47,"value":584},{"type":42,"tag":128,"props":4898,"children":4899},{"style":259},[4900],{"type":47,"value":302},{"type":42,"tag":128,"props":4902,"children":4903},{"class":130,"line":315},[4904],{"type":42,"tag":128,"props":4905,"children":4906},{"emptyLinePlaceholder":309},[4907],{"type":47,"value":312},{"type":42,"tag":128,"props":4909,"children":4910},{"class":130,"line":386},[4911,4915,4920,4924,4928,4932,4936,4940,4944,4948,4952,4956,4960,4964,4968,4972,4976],{"type":42,"tag":128,"props":4912,"children":4913},{"style":319},[4914],{"type":47,"value":322},{"type":42,"tag":128,"props":4916,"children":4917},{"style":265},[4918],{"type":47,"value":4919}," handler",{"type":42,"tag":128,"props":4921,"children":4922},{"style":259},[4923],{"type":47,"value":629},{"type":42,"tag":128,"props":4925,"children":4926},{"style":135},[4927],{"type":47,"value":4862},{"type":42,"tag":128,"props":4929,"children":4930},{"style":259},[4931],{"type":47,"value":684},{"type":42,"tag":128,"props":4933,"children":4934},{"style":319},[4935],{"type":47,"value":613},{"type":42,"tag":128,"props":4937,"children":4938},{"style":259},[4939],{"type":47,"value":618},{"type":42,"tag":128,"props":4941,"children":4942},{"style":621},[4943],{"type":47,"value":3067},{"type":42,"tag":128,"props":4945,"children":4946},{"style":259},[4947],{"type":47,"value":629},{"type":42,"tag":128,"props":4949,"children":4950},{"style":135},[4951],{"type":47,"value":4871},{"type":42,"tag":128,"props":4953,"children":4954},{"style":259},[4955],{"type":47,"value":273},{"type":42,"tag":128,"props":4957,"children":4958},{"style":621},[4959],{"type":47,"value":643},{"type":42,"tag":128,"props":4961,"children":4962},{"style":259},[4963],{"type":47,"value":629},{"type":42,"tag":128,"props":4965,"children":4966},{"style":135},[4967],{"type":47,"value":4880},{"type":42,"tag":128,"props":4969,"children":4970},{"style":259},[4971],{"type":47,"value":656},{"type":42,"tag":128,"props":4973,"children":4974},{"style":319},[4975],{"type":47,"value":661},{"type":42,"tag":128,"props":4977,"children":4978},{"style":259},[4979],{"type":47,"value":666},{"type":42,"tag":128,"props":4981,"children":4982},{"class":130,"line":446},[4983,4987,4991,4995,4999,5003,5008,5012,5017,5021,5025,5029,5034,5039,5043,5048,5052],{"type":42,"tag":128,"props":4984,"children":4985},{"style":319},[4986],{"type":47,"value":674},{"type":42,"tag":128,"props":4988,"children":4989},{"style":259},[4990],{"type":47,"value":262},{"type":42,"tag":128,"props":4992,"children":4993},{"style":265},[4994],{"type":47,"value":679},{"type":42,"tag":128,"props":4996,"children":4997},{"style":259},[4998],{"type":47,"value":283},{"type":42,"tag":128,"props":5000,"children":5001},{"style":259},[5002],{"type":47,"value":684},{"type":42,"tag":128,"props":5004,"children":5005},{"style":265},[5006],{"type":47,"value":5007}," JSON",{"type":42,"tag":128,"props":5009,"children":5010},{"style":259},[5011],{"type":47,"value":83},{"type":42,"tag":128,"props":5013,"children":5014},{"style":340},[5015],{"type":47,"value":5016},"parse",{"type":42,"tag":128,"props":5018,"children":5019},{"style":695},[5020],{"type":47,"value":347},{"type":42,"tag":128,"props":5022,"children":5023},{"style":265},[5024],{"type":47,"value":3067},{"type":42,"tag":128,"props":5026,"children":5027},{"style":259},[5028],{"type":47,"value":83},{"type":42,"tag":128,"props":5030,"children":5031},{"style":265},[5032],{"type":47,"value":5033},"body",{"type":42,"tag":128,"props":5035,"children":5036},{"style":259},[5037],{"type":47,"value":5038}," ||",{"type":42,"tag":128,"props":5040,"children":5041},{"style":259},[5042],{"type":47,"value":293},{"type":42,"tag":128,"props":5044,"children":5045},{"style":141},[5046],{"type":47,"value":5047},"{}",{"type":42,"tag":128,"props":5049,"children":5050},{"style":259},[5051],{"type":47,"value":352},{"type":42,"tag":128,"props":5053,"children":5054},{"style":695},[5055],{"type":47,"value":383},{"type":42,"tag":128,"props":5057,"children":5058},{"class":130,"line":454},[5059],{"type":42,"tag":128,"props":5060,"children":5061},{"emptyLinePlaceholder":309},[5062],{"type":47,"value":312},{"type":42,"tag":128,"props":5064,"children":5065},{"class":130,"line":464},[5066,5070],{"type":42,"tag":128,"props":5067,"children":5068},{"style":253},[5069],{"type":47,"value":795},{"type":42,"tag":128,"props":5071,"children":5072},{"style":259},[5073],{"type":47,"value":666},{"type":42,"tag":128,"props":5075,"children":5076},{"class":130,"line":789},[5077,5082,5086,5091],{"type":42,"tag":128,"props":5078,"children":5079},{"style":695},[5080],{"type":47,"value":5081},"    statusCode",{"type":42,"tag":128,"props":5083,"children":5084},{"style":259},[5085],{"type":47,"value":629},{"type":42,"tag":128,"props":5087,"children":5088},{"style":775},[5089],{"type":47,"value":5090}," 200",{"type":42,"tag":128,"props":5092,"children":5093},{"style":259},[5094],{"type":47,"value":924},{"type":42,"tag":128,"props":5096,"children":5097},{"class":130,"line":876},[5098,5103,5107,5111,5115,5120,5124],{"type":42,"tag":128,"props":5099,"children":5100},{"style":695},[5101],{"type":47,"value":5102},"    body",{"type":42,"tag":128,"props":5104,"children":5105},{"style":259},[5106],{"type":47,"value":629},{"type":42,"tag":128,"props":5108,"children":5109},{"style":265},[5110],{"type":47,"value":5007},{"type":42,"tag":128,"props":5112,"children":5113},{"style":259},[5114],{"type":47,"value":83},{"type":42,"tag":128,"props":5116,"children":5117},{"style":340},[5118],{"type":47,"value":5119},"stringify",{"type":42,"tag":128,"props":5121,"children":5122},{"style":695},[5123],{"type":47,"value":347},{"type":42,"tag":128,"props":5125,"children":5126},{"style":259},[5127],{"type":47,"value":1307},{"type":42,"tag":128,"props":5129,"children":5130},{"class":130,"line":1011},[5131,5136,5140],{"type":42,"tag":128,"props":5132,"children":5133},{"style":695},[5134],{"type":47,"value":5135},"      app_metadata",{"type":42,"tag":128,"props":5137,"children":5138},{"style":259},[5139],{"type":47,"value":629},{"type":42,"tag":128,"props":5141,"children":5142},{"style":259},[5143],{"type":47,"value":666},{"type":42,"tag":128,"props":5145,"children":5146},{"class":130,"line":1426},[5147,5152,5156,5160,5165],{"type":42,"tag":128,"props":5148,"children":5149},{"style":259},[5150],{"type":47,"value":5151},"        ...",{"type":42,"tag":128,"props":5153,"children":5154},{"style":265},[5155],{"type":47,"value":425},{"type":42,"tag":128,"props":5157,"children":5158},{"style":259},[5159],{"type":47,"value":83},{"type":42,"tag":128,"props":5161,"children":5162},{"style":265},[5163],{"type":47,"value":5164},"app_metadata",{"type":42,"tag":128,"props":5166,"children":5167},{"style":259},[5168],{"type":47,"value":924},{"type":42,"tag":128,"props":5170,"children":5171},{"class":130,"line":1435},[5172,5177,5181,5185,5189,5194,5198,5202],{"type":42,"tag":128,"props":5173,"children":5174},{"style":695},[5175],{"type":47,"value":5176},"        roles",{"type":42,"tag":128,"props":5178,"children":5179},{"style":259},[5180],{"type":47,"value":629},{"type":42,"tag":128,"props":5182,"children":5183},{"style":695},[5184],{"type":47,"value":3650},{"type":42,"tag":128,"props":5186,"children":5187},{"style":259},[5188],{"type":47,"value":352},{"type":42,"tag":128,"props":5190,"children":5191},{"style":141},[5192],{"type":47,"value":5193},"member",{"type":42,"tag":128,"props":5195,"children":5196},{"style":259},[5197],{"type":47,"value":352},{"type":42,"tag":128,"props":5199,"children":5200},{"style":695},[5201],{"type":47,"value":3668},{"type":42,"tag":128,"props":5203,"children":5204},{"style":259},[5205],{"type":47,"value":924},{"type":42,"tag":128,"props":5207,"children":5208},{"class":130,"line":1801},[5209],{"type":42,"tag":128,"props":5210,"children":5211},{"style":259},[5212],{"type":47,"value":5213},"      },\n",{"type":42,"tag":128,"props":5215,"children":5216},{"class":130,"line":1829},[5217,5221,5225],{"type":42,"tag":128,"props":5218,"children":5219},{"style":259},[5220],{"type":47,"value":1746},{"type":42,"tag":128,"props":5222,"children":5223},{"style":695},[5224],{"type":47,"value":656},{"type":42,"tag":128,"props":5226,"children":5227},{"style":259},[5228],{"type":47,"value":924},{"type":42,"tag":128,"props":5230,"children":5231},{"class":130,"line":1861},[5232],{"type":42,"tag":128,"props":5233,"children":5234},{"style":259},[5235],{"type":47,"value":1432},{"type":42,"tag":128,"props":5237,"children":5238},{"class":130,"line":1931},[5239],{"type":42,"tag":128,"props":5240,"children":5241},{"style":259},[5242],{"type":47,"value":882},{"type":42,"tag":128,"props":5244,"children":5245},{"class":130,"line":1939},[5246],{"type":42,"tag":128,"props":5247,"children":5248},{"emptyLinePlaceholder":309},[5249],{"type":47,"value":312},{"type":42,"tag":128,"props":5251,"children":5252},{"class":130,"line":1947},[5253,5257,5261,5265],{"type":42,"tag":128,"props":5254,"children":5255},{"style":253},[5256],{"type":47,"value":603},{"type":42,"tag":128,"props":5258,"children":5259},{"style":259},[5260],{"type":47,"value":262},{"type":42,"tag":128,"props":5262,"children":5263},{"style":265},[5264],{"type":47,"value":4919},{"type":42,"tag":128,"props":5266,"children":5267},{"style":259},[5268],{"type":47,"value":5269}," }\n",{"type":42,"tag":50,"props":5271,"children":5272},{},[5273,5275,5280,5282,5288],{"type":47,"value":5274},"The response body replaces ",{"type":42,"tag":76,"props":5276,"children":5278},{"className":5277},[],[5279],{"type":47,"value":5164},{"type":47,"value":5281}," and\u002For ",{"type":42,"tag":76,"props":5283,"children":5285},{"className":5284},[],[5286],{"type":47,"value":5287},"user_metadata",{"type":47,"value":5289}," on the user record — include all fields you want to keep.",{"type":42,"tag":110,"props":5291,"children":5293},{"id":5292},"roles-and-authorization",[5294],{"type":47,"value":5295},"Roles and Authorization",{"type":42,"tag":156,"props":5297,"children":5298},{},[5299,5313],{"type":42,"tag":160,"props":5300,"children":5301},{},[5302,5311],{"type":42,"tag":70,"props":5303,"children":5304},{},[5305],{"type":42,"tag":76,"props":5306,"children":5308},{"className":5307},[],[5309],{"type":47,"value":5310},"app_metadata.roles",{"type":47,"value":5312}," — Server-controlled. Only settable via the Netlify UI, admin API, or Identity event functions. Never let users set their own roles.",{"type":42,"tag":160,"props":5314,"children":5315},{},[5316,5324,5326,5332],{"type":42,"tag":70,"props":5317,"children":5318},{},[5319],{"type":42,"tag":76,"props":5320,"children":5322},{"className":5321},[],[5323],{"type":47,"value":5287},{"type":47,"value":5325}," — User-controlled. Users can update via ",{"type":42,"tag":76,"props":5327,"children":5329},{"className":5328},[],[5330],{"type":47,"value":5331},"updateUser({ data: { ... } })",{"type":47,"value":83},{"type":42,"tag":194,"props":5334,"children":5336},{"id":5335},"role-based-redirects",[5337],{"type":47,"value":5338},"Role-Based Redirects",{"type":42,"tag":117,"props":5340,"children":5344},{"className":5341,"code":5342,"language":5343,"meta":122,"style":122},"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",[5345],{"type":42,"tag":76,"props":5346,"children":5347},{"__ignoreMap":122},[5348,5356,5364,5372,5380,5388,5396,5403,5410,5417,5425],{"type":42,"tag":128,"props":5349,"children":5350},{"class":130,"line":131},[5351],{"type":42,"tag":128,"props":5352,"children":5353},{},[5354],{"type":47,"value":5355},"# netlify.toml\n",{"type":42,"tag":128,"props":5357,"children":5358},{"class":130,"line":305},[5359],{"type":42,"tag":128,"props":5360,"children":5361},{},[5362],{"type":47,"value":5363},"[[redirects]]\n",{"type":42,"tag":128,"props":5365,"children":5366},{"class":130,"line":315},[5367],{"type":42,"tag":128,"props":5368,"children":5369},{},[5370],{"type":47,"value":5371},"  from = \"\u002Fadmin\u002F*\"\n",{"type":42,"tag":128,"props":5373,"children":5374},{"class":130,"line":386},[5375],{"type":42,"tag":128,"props":5376,"children":5377},{},[5378],{"type":47,"value":5379},"  to = \"\u002Fadmin\u002F:splat\"\n",{"type":42,"tag":128,"props":5381,"children":5382},{"class":130,"line":446},[5383],{"type":42,"tag":128,"props":5384,"children":5385},{},[5386],{"type":47,"value":5387},"  status = 200\n",{"type":42,"tag":128,"props":5389,"children":5390},{"class":130,"line":454},[5391],{"type":42,"tag":128,"props":5392,"children":5393},{},[5394],{"type":47,"value":5395},"  conditions = { Role = [\"admin\"] }\n",{"type":42,"tag":128,"props":5397,"children":5398},{"class":130,"line":464},[5399],{"type":42,"tag":128,"props":5400,"children":5401},{"emptyLinePlaceholder":309},[5402],{"type":47,"value":312},{"type":42,"tag":128,"props":5404,"children":5405},{"class":130,"line":789},[5406],{"type":42,"tag":128,"props":5407,"children":5408},{},[5409],{"type":47,"value":5363},{"type":42,"tag":128,"props":5411,"children":5412},{"class":130,"line":876},[5413],{"type":42,"tag":128,"props":5414,"children":5415},{},[5416],{"type":47,"value":5371},{"type":42,"tag":128,"props":5418,"children":5419},{"class":130,"line":1011},[5420],{"type":42,"tag":128,"props":5421,"children":5422},{},[5423],{"type":47,"value":5424},"  to = \"\u002F\"\n",{"type":42,"tag":128,"props":5426,"children":5427},{"class":130,"line":1426},[5428],{"type":42,"tag":128,"props":5429,"children":5430},{},[5431],{"type":47,"value":5432},"  status = 302\n",{"type":42,"tag":50,"props":5434,"children":5435},{},[5436,5438,5444],{"type":47,"value":5437},"Rules are evaluated top-to-bottom. The ",{"type":42,"tag":76,"props":5439,"children":5441},{"className":5440},[],[5442],{"type":47,"value":5443},"nf_jwt",{"type":47,"value":5445}," cookie is read by the CDN to evaluate role conditions.",{"type":42,"tag":110,"props":5447,"children":5449},{"id":5448},"bundled-references-load-as-needed",[5450],{"type":47,"value":5451},"Bundled References (Load As Needed)",{"type":42,"tag":156,"props":5453,"children":5454},{},[5455],{"type":42,"tag":160,"props":5456,"children":5457},{},[5458,5464],{"type":42,"tag":56,"props":5459,"children":5461},{"href":5460},"references\u002Fadvanced-patterns.md",[5462],{"type":47,"value":5463},"Advanced patterns",{"type":47,"value":5465}," — password recovery, invite acceptance, email change, session hydration, SSR integration",{"type":42,"tag":5467,"props":5468,"children":5469},"style",{},[5470],{"type":47,"value":5471},"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":5473,"total":5590},[5474,5493,5509,5519,5537,5558,5578],{"slug":5475,"name":5475,"fn":5476,"description":5477,"org":5478,"tags":5479,"stars":25,"repoUrl":26,"updatedAt":5492},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5480,5483,5486,5489],{"name":5481,"slug":5482,"type":15},"Accessibility","accessibility",{"name":5484,"slug":5485,"type":15},"Charts","charts",{"name":5487,"slug":5488,"type":15},"Data Visualization","data-visualization",{"name":5490,"slug":5491,"type":15},"Design","design","2026-06-30T19:00:57.102",{"slug":5494,"name":5494,"fn":5495,"description":5496,"org":5497,"tags":5498,"stars":25,"repoUrl":26,"updatedAt":5508},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5499,5502,5505],{"name":5500,"slug":5501,"type":15},"Agents","agents",{"name":5503,"slug":5504,"type":15},"Browser Automation","browser-automation",{"name":5506,"slug":5507,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":5510,"name":5510,"fn":5511,"description":5512,"org":5513,"tags":5514,"stars":25,"repoUrl":26,"updatedAt":5518},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5515,5516,5517],{"name":5503,"slug":5504,"type":15},{"name":199,"slug":196,"type":15},{"name":5506,"slug":5507,"type":15},"2026-04-06T18:41:17.526867",{"slug":5520,"name":5520,"fn":5521,"description":5522,"org":5523,"tags":5524,"stars":25,"repoUrl":26,"updatedAt":5536},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5525,5526,5529,5532,5533],{"name":5500,"slug":5501,"type":15},{"name":5527,"slug":5528,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":5530,"slug":5531,"type":15},"SDK","sdk",{"name":23,"slug":24,"type":15},{"name":5534,"slug":5535,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":5538,"name":5538,"fn":5539,"description":5540,"org":5541,"tags":5542,"stars":25,"repoUrl":26,"updatedAt":5557},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5543,5546,5548,5551,5554],{"name":5544,"slug":5545,"type":15},"Frontend","frontend",{"name":5547,"slug":3806,"type":15},"React",{"name":5549,"slug":5550,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":5552,"slug":5553,"type":15},"UI Components","ui-components",{"name":5555,"slug":5556,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":5559,"name":5559,"fn":5560,"description":5561,"org":5562,"tags":5563,"stars":25,"repoUrl":26,"updatedAt":5577},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5564,5567,5570,5573,5576],{"name":5565,"slug":5566,"type":15},"AI Infrastructure","ai-infrastructure",{"name":5568,"slug":5569,"type":15},"Cost Optimization","cost-optimization",{"name":5571,"slug":5572,"type":15},"LLM","llm",{"name":5574,"slug":5575,"type":15},"Performance","performance",{"name":5555,"slug":5556,"type":15},"2026-04-06T18:40:44.377464",{"slug":5579,"name":5579,"fn":5580,"description":5581,"org":5582,"tags":5583,"stars":25,"repoUrl":26,"updatedAt":5589},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5584,5585,5588],{"name":5568,"slug":5569,"type":15},{"name":5586,"slug":5587,"type":15},"Database","database",{"name":5571,"slug":5572,"type":15},"2026-04-06T18:41:08.513425",600,{"items":5592,"total":5789},[5593,5614,5637,5654,5670,5687,5706,5718,5732,5746,5758,5773],{"slug":5594,"name":5594,"fn":5595,"description":5596,"org":5597,"tags":5598,"stars":5611,"repoUrl":5612,"updatedAt":5613},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5599,5602,5605,5608],{"name":5600,"slug":5601,"type":15},"Documents","documents",{"name":5603,"slug":5604,"type":15},"Healthcare","healthcare",{"name":5606,"slug":5607,"type":15},"Insurance","insurance",{"name":5609,"slug":5610,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":5615,"name":5615,"fn":5616,"description":5617,"org":5618,"tags":5619,"stars":5634,"repoUrl":5635,"updatedAt":5636},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5620,5623,5625,5628,5631],{"name":5621,"slug":5622,"type":15},".NET","dotnet",{"name":5624,"slug":5615,"type":15},"ASP.NET Core",{"name":5626,"slug":5627,"type":15},"Blazor","blazor",{"name":5629,"slug":5630,"type":15},"C#","csharp",{"name":5632,"slug":5633,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":5638,"name":5638,"fn":5639,"description":5640,"org":5641,"tags":5642,"stars":5634,"repoUrl":5635,"updatedAt":5653},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5643,5646,5649,5652],{"name":5644,"slug":5645,"type":15},"Apps SDK","apps-sdk",{"name":5647,"slug":5648,"type":15},"ChatGPT","chatgpt",{"name":5650,"slug":5651,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":5655,"name":5655,"fn":5656,"description":5657,"org":5658,"tags":5659,"stars":5634,"repoUrl":5635,"updatedAt":5669},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5660,5663,5666],{"name":5661,"slug":5662,"type":15},"API Development","api-development",{"name":5664,"slug":5665,"type":15},"CLI","cli",{"name":5667,"slug":5668,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":5671,"name":5671,"fn":5672,"description":5673,"org":5674,"tags":5675,"stars":5634,"repoUrl":5635,"updatedAt":5686},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5676,5679,5682,5683],{"name":5677,"slug":5678,"type":15},"Cloudflare","cloudflare",{"name":5680,"slug":5681,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":5527,"slug":5528,"type":15},{"name":5684,"slug":5685,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":5688,"name":5688,"fn":5689,"description":5690,"org":5691,"tags":5692,"stars":5634,"repoUrl":5635,"updatedAt":5705},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5693,5696,5699,5702],{"name":5694,"slug":5695,"type":15},"Productivity","productivity",{"name":5697,"slug":5698,"type":15},"Project Management","project-management",{"name":5700,"slug":5701,"type":15},"Strategy","strategy",{"name":5703,"slug":5704,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":5707,"name":5707,"fn":5708,"description":5709,"org":5710,"tags":5711,"stars":5634,"repoUrl":5635,"updatedAt":5717},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5712,5713,5715,5716],{"name":5490,"slug":5491,"type":15},{"name":5714,"slug":5707,"type":15},"Figma",{"name":5544,"slug":5545,"type":15},{"name":5650,"slug":5651,"type":15},"2026-04-12T05:06:47.939943",{"slug":5719,"name":5719,"fn":5720,"description":5721,"org":5722,"tags":5723,"stars":5634,"repoUrl":5635,"updatedAt":5731},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5724,5725,5728,5729,5730],{"name":5490,"slug":5491,"type":15},{"name":5726,"slug":5727,"type":15},"Design System","design-system",{"name":5714,"slug":5707,"type":15},{"name":5544,"slug":5545,"type":15},{"name":5552,"slug":5553,"type":15},"2026-05-10T05:59:52.971881",{"slug":5733,"name":5733,"fn":5734,"description":5735,"org":5736,"tags":5737,"stars":5634,"repoUrl":5635,"updatedAt":5745},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5738,5739,5740,5743,5744],{"name":5490,"slug":5491,"type":15},{"name":5726,"slug":5727,"type":15},{"name":5741,"slug":5742,"type":15},"Documentation","documentation",{"name":5714,"slug":5707,"type":15},{"name":5544,"slug":5545,"type":15},"2026-05-16T06:07:47.821474",{"slug":5747,"name":5747,"fn":5748,"description":5749,"org":5750,"tags":5751,"stars":5634,"repoUrl":5635,"updatedAt":5757},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5752,5753,5754,5755,5756],{"name":5490,"slug":5491,"type":15},{"name":5714,"slug":5707,"type":15},{"name":5544,"slug":5545,"type":15},{"name":5552,"slug":5553,"type":15},{"name":5632,"slug":5633,"type":15},"2026-05-16T06:07:40.583615",{"slug":5759,"name":5759,"fn":5760,"description":5761,"org":5762,"tags":5763,"stars":5634,"repoUrl":5635,"updatedAt":5772},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5764,5767,5768,5771],{"name":5765,"slug":5766,"type":15},"Animation","animation",{"name":5667,"slug":5668,"type":15},{"name":5769,"slug":5770,"type":15},"Creative","creative",{"name":5490,"slug":5491,"type":15},"2026-05-02T05:31:48.48485",{"slug":5774,"name":5774,"fn":5775,"description":5776,"org":5777,"tags":5778,"stars":5634,"repoUrl":5635,"updatedAt":5788},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5779,5780,5781,5784,5787],{"name":5769,"slug":5770,"type":15},{"name":5490,"slug":5491,"type":15},{"name":5782,"slug":5783,"type":15},"Image Generation","image-generation",{"name":5785,"slug":5786,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]