[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-better-auth-better-auth-security-best-practices":3,"mdc-xik6w2-key":33,"related-org-better-auth-better-auth-security-best-practices":6247,"related-repo-better-auth-better-auth-security-best-practices":6325},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"better-auth-security-best-practices","configure security best practices for Better Auth","Configure rate limiting, manage auth secrets, set up CSRF protection, define trusted origins, secure sessions and cookies, encrypt OAuth tokens, track IP addresses, and implement audit logging for Better Auth. Use when users need to secure their auth setup, prevent brute force attacks, or harden a Better Auth deployment.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"better-auth","Better Auth","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fbetter-auth.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Auth","auth",{"name":21,"slug":22,"type":15},"Audit","audit",201,"https:\u002F\u002Fgithub.com\u002Fbetter-auth\u002Fskills","2026-07-11T05:40:04.318478",null,28,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fbetter-auth\u002Fskills\u002Ftree\u002FHEAD\u002Fsecurity","---\nname: better-auth-security-best-practices\ndescription: Configure rate limiting, manage auth secrets, set up CSRF protection, define trusted origins, secure sessions and cookies, encrypt OAuth tokens, track IP addresses, and implement audit logging for Better Auth. Use when users need to secure their auth setup, prevent brute force attacks, or harden a Better Auth deployment.\n---\n\n## Secret Management\n\n### Configuring the Secret\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  secret: process.env.BETTER_AUTH_SECRET, \u002F\u002F or via `BETTER_AUTH_SECRET` env\n});\n```\n\nBetter Auth looks for secrets in this order:\n1. `options.secret` in your config\n2. `BETTER_AUTH_SECRET` environment variable\n3. `AUTH_SECRET` environment variable\n\n### Secret Requirements\n\n- Rejects default\u002Fplaceholder secrets in production\n- Warns if shorter than 32 characters or entropy below 120 bits\n- Generate: `openssl rand -base64 32`\n- Never commit secrets to version control\n\n## Rate Limiting\n\nEnabled in production by default. Applies to all endpoints. Plugins can override per-endpoint.\n\n### Default Configuration\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  rateLimit: {\n    enabled: true, \u002F\u002F Default: true in production\n    window: 10, \u002F\u002F Time window in seconds (default: 10)\n    max: 100, \u002F\u002F Max requests per window (default: 100)\n  },\n});\n```\n\n### Storage Options\n\nOptions: `\"memory\"` (resets on restart, avoid on serverless), `\"database\"` (persistent), `\"secondary-storage\"` (Redis, default when available).\n\n```ts\nrateLimit: {\n  storage: \"database\",\n}\n```\n\n### Custom Storage\n\nImplement your own rate limit storage:\n\n```ts\nrateLimit: {\n  customStorage: {\n    get: async (key) => {\n      \u002F\u002F Return { count: number, expiresAt: number } or null\n    },\n    set: async (key, data) => {\n      \u002F\u002F Store the rate limit data\n    },\n  },\n}\n```\n\n### Per-Endpoint Rules\n\nSensitive endpoints default to 3 requests per 10 seconds (`\u002Fsign-in`, `\u002Fsign-up`, `\u002Fchange-password`, `\u002Fchange-email`). Override:\n\n```ts\nrateLimit: {\n  customRules: {\n    \"\u002Fapi\u002Fauth\u002Fsign-in\u002Femail\": {\n      window: 60, \u002F\u002F 1 minute window\n      max: 5, \u002F\u002F 5 attempts\n    },\n    \"\u002Fapi\u002Fauth\u002Fsome-safe-endpoint\": false, \u002F\u002F Disable rate limiting\n  },\n}\n```\n\n## CSRF Protection\n\nMulti-layer protection: origin header validation, Fetch Metadata checks, and first-login protection.\n\n### Configuration\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    disableCSRFCheck: false, \u002F\u002F Default: false (keep enabled)\n  },\n});\n```\n\nOnly disable for testing or with an alternative CSRF mechanism.\n\n## Trusted Origins\n\n### Configuring Trusted Origins\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  baseURL: \"https:\u002F\u002Fapi.example.com\",\n  trustedOrigins: [\n    \"https:\u002F\u002Fapp.example.com\",\n    \"https:\u002F\u002Fadmin.example.com\",\n  ],\n});\n```\n\nThe `baseURL` origin is automatically trusted. Also configurable via env: `BETTER_AUTH_TRUSTED_ORIGINS=https:\u002F\u002Fapp.example.com,https:\u002F\u002Fadmin.example.com`\n\n### Wildcard Patterns\n\n```ts\ntrustedOrigins: [\n  \"*.example.com\", \u002F\u002F Matches any subdomain\n  \"https:\u002F\u002F*.example.com\", \u002F\u002F Protocol-specific wildcard\n  \"exp:\u002F\u002F192.168.*.*:*\u002F*\", \u002F\u002F Custom schemes (e.g., Expo)\n]\n```\n\n### Dynamic Trusted Origins\n\nCompute trusted origins based on the request:\n\n```ts\ntrustedOrigins: async (request) => {\n  \u002F\u002F Validate against database, header, etc.\n  const tenant = getTenantFromRequest(request);\n  return [`https:\u002F\u002F${tenant}.myapp.com`];\n}\n```\n\nValidates `callbackURL`, `redirectTo`, `errorCallbackURL`, `newUserCallbackURL`, and `origin` against trusted origins. Invalid URLs receive 403.\n\n## Session Security\n\n### Session Expiration\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days (default)\n    updateAge: 60 * 60 * 24, \u002F\u002F Refresh session every 24 hours (default)\n  },\n});\n```\n\n### Session Caching Strategies\n\nCache session data in cookies to reduce database queries:\n\n```ts\nsession: {\n  cookieCache: {\n    enabled: true,\n    maxAge: 60 * 5, \u002F\u002F 5 minutes\n    strategy: \"compact\", \u002F\u002F Options: \"compact\", \"jwt\", \"jwe\"\n  },\n}\n```\n\nStrategies: `\"compact\"` (Base64url + HMAC, smallest), `\"jwt\"` (HS256, standard), `\"jwe\"` (encrypted, use when session has sensitive data).\n\n## Cookie Security\n\nDefaults: `secure: true` (HTTPS\u002Fproduction), `sameSite: \"lax\"`, `httpOnly: true`, `path: \"\u002F\"`, prefix `__Secure-`.\n\n### Custom Cookie Configuration\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    useSecureCookies: true, \u002F\u002F Force secure cookies\n    cookiePrefix: \"myapp\", \u002F\u002F Custom prefix (default: \"better-auth\")\n    defaultCookieAttributes: {\n      sameSite: \"strict\", \u002F\u002F Stricter CSRF protection\n      path: \"\u002Fauth\", \u002F\u002F Limit cookie scope\n    },\n  },\n});\n```\n\n### Cross-Subdomain Cookies\n\n```ts\nadvanced: {\n  crossSubDomainCookies: {\n    enabled: true,\n    domain: \".example.com\", \u002F\u002F Note the leading dot\n    additionalCookies: [\"session_token\", \"session_data\"],\n  },\n}\n```\n\nOnly enable if you need authentication sharing and trust all subdomains.\n\n## OAuth \u002F Social Provider Security\n\nPKCE is automatic for all OAuth flows. State tokens are 32-char random strings expiring after 10 minutes.\n\n### State Parameter Storage\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  account: {\n    storeStateStrategy: \"cookie\", \u002F\u002F Options: \"cookie\" (default), \"database\"\n  },\n});\n```\n\n### Encrypting OAuth Tokens\n\n```ts\naccount: {\n  encryptOAuthTokens: true, \u002F\u002F Uses AES-256-GCM\n}\n```\n\nEnable if storing OAuth tokens for API access on behalf of users. Use `skipStateCookieCheck: true` only for mobile apps that cannot maintain cookies.\n\n## IP-Based Security\n\n### IP Address Configuration\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    ipAddress: {\n      ipAddressHeaders: [\"x-forwarded-for\", \"x-real-ip\"], \u002F\u002F Headers to check\n      disableIpTracking: false, \u002F\u002F Keep enabled for rate limiting\n    },\n  },\n});\n```\n\nSet `ipv6Subnet` (128, 64, 48, 32; default 64) to group IPv6 addresses. Enable `trustedProxyHeaders: true` only if behind a trusted reverse proxy.\n\n## Database Hooks for Security Auditing\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  databaseHooks: {\n    session: {\n      create: {\n        after: async ({ data, ctx }) => {\n          await auditLog(\"session.created\", {\n            userId: data.userId,\n            ip: ctx?.request?.headers.get(\"x-forwarded-for\"),\n            userAgent: ctx?.request?.headers.get(\"user-agent\"),\n          });\n        },\n      },\n      delete: {\n        before: async ({ data }) => {\n          await auditLog(\"session.revoked\", { sessionId: data.id });\n        },\n      },\n    },\n    user: {\n      update: {\n        after: async ({ data, oldData }) => {\n          if (oldData?.email !== data.email) {\n            await auditLog(\"user.email_changed\", {\n              userId: data.id,\n              oldEmail: oldData?.email,\n              newEmail: data.email,\n            });\n          }\n        },\n      },\n    },\n    account: {\n      create: {\n        after: async ({ data }) => {\n          await auditLog(\"account.linked\", {\n            userId: data.userId,\n            provider: data.providerId,\n          });\n        },\n      },\n    },\n  },\n});\n```\n\nReturn `false` from a `before` hook to prevent an operation.\n\n## Background Tasks\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    backgroundTasks: {\n      handler: (promise) => {\n        \u002F\u002F Platform-specific handler\n        \u002F\u002F Vercel: waitUntil(promise)\n        \u002F\u002F Cloudflare: ctx.waitUntil(promise)\n        waitUntil(promise);\n      },\n    },\n  },\n});\n```\n\nEnsures operations like sending emails don't affect response timing.\n\n## Account Enumeration Prevention\n\nBuilt-in: consistent response messages, dummy operations on invalid requests, background email sending. Return generic error messages (\"Invalid credentials\") rather than specific ones (\"User not found\").\n\n## Complete Security Configuration Example\n\n```ts\nimport { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  secret: process.env.BETTER_AUTH_SECRET,\n  baseURL: \"https:\u002F\u002Fapi.example.com\",\n  trustedOrigins: [\n    \"https:\u002F\u002Fapp.example.com\",\n    \"https:\u002F\u002F*.preview.example.com\",\n  ],\n  \n  \u002F\u002F Rate limiting\n  rateLimit: {\n    enabled: true,\n    storage: \"secondary-storage\",\n    customRules: {\n      \"\u002Fapi\u002Fauth\u002Fsign-in\u002Femail\": { window: 60, max: 5 },\n      \"\u002Fapi\u002Fauth\u002Fsign-up\u002Femail\": { window: 60, max: 3 },\n    },\n  },\n  \n  \u002F\u002F Session security\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days\n    updateAge: 60 * 60 * 24, \u002F\u002F 24 hours\n    freshAge: 60 * 60, \u002F\u002F 1 hour for sensitive actions\n    cookieCache: {\n      enabled: true,\n      maxAge: 300,\n      strategy: \"jwe\", \u002F\u002F Encrypted session data\n    },\n  },\n  \n  \u002F\u002F OAuth security\n  account: {\n    encryptOAuthTokens: true,\n    storeStateStrategy: \"cookie\",\n  },\n  \n  \n  \u002F\u002F Advanced settings\n  advanced: {\n    useSecureCookies: true,\n    cookiePrefix: \"myapp\",\n    defaultCookieAttributes: {\n      sameSite: \"lax\",\n    },\n    ipAddress: {\n      ipAddressHeaders: [\"x-forwarded-for\"],\n      ipv6Subnet: 64,\n    },\n    backgroundTasks: {\n      handler: (promise) => waitUntil(promise),\n    },\n  },\n  \n  \u002F\u002F Security auditing\n  databaseHooks: {\n    session: {\n      create: {\n        after: async ({ data, ctx }) => {\n          console.log(`New session for user ${data.userId}`);\n        },\n      },\n    },\n    user: {\n      update: {\n        after: async ({ data, oldData }) => {\n          if (oldData?.email !== data.email) {\n            console.log(`Email changed for user ${data.id}`);\n          }\n        },\n      },\n    },\n  },\n});\n```\n\n## Security Checklist\n\nBefore deploying to production:\n\n- [ ] **Secret**: Use a strong, unique secret (32+ characters, high entropy)\n- [ ] **HTTPS**: Ensure `baseURL` uses HTTPS\n- [ ] **Trusted Origins**: Configure all valid origins (frontend, mobile apps)\n- [ ] **Rate Limiting**: Keep enabled with appropriate limits\n- [ ] **CSRF Protection**: Keep enabled (`disableCSRFCheck: false`)\n- [ ] **Secure Cookies**: Enabled automatically with HTTPS\n- [ ] **OAuth Tokens**: Consider `encryptOAuthTokens: true` if storing tokens\n- [ ] **Background Tasks**: Configure for serverless platforms\n- [ ] **Audit Logging**: Implement via `databaseHooks` or `hooks`\n- [ ] **IP Tracking**: Configure headers if behind a proxy\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,47,54,238,244,280,286,316,322,327,333,541,547,576,638,644,649,819,825,860,1031,1037,1042,1048,1196,1201,1207,1213,1410,1429,1435,1542,1548,1553,1705,1747,1753,1759,1974,1980,1985,2124,2153,2159,2201,2207,2480,2486,2646,2651,2657,2662,2668,2824,2830,2885,2898,2904,2910,3138,3159,3165,4260,4280,4286,4518,4523,4529,4534,4540,6038,6044,6049,6241],{"type":39,"tag":40,"props":41,"children":43},"element","h2",{"id":42},"secret-management",[44],{"type":45,"value":46},"text","Secret Management",{"type":39,"tag":48,"props":49,"children":51},"h3",{"id":50},"configuring-the-secret",[52],{"type":45,"value":53},"Configuring the Secret",{"type":39,"tag":55,"props":56,"children":61},"pre",{"className":57,"code":58,"language":59,"meta":60,"style":60},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  secret: process.env.BETTER_AUTH_SECRET, \u002F\u002F or via `BETTER_AUTH_SECRET` env\n});\n","ts","",[62],{"type":39,"tag":63,"props":64,"children":65},"code",{"__ignoreMap":60},[66,120,130,170,220],{"type":39,"tag":67,"props":68,"children":71},"span",{"class":69,"line":70},"line",1,[72,78,84,90,95,100,105,110,115],{"type":39,"tag":67,"props":73,"children":75},{"style":74},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[76],{"type":45,"value":77},"import",{"type":39,"tag":67,"props":79,"children":81},{"style":80},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[82],{"type":45,"value":83}," {",{"type":39,"tag":67,"props":85,"children":87},{"style":86},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[88],{"type":45,"value":89}," betterAuth",{"type":39,"tag":67,"props":91,"children":92},{"style":80},[93],{"type":45,"value":94}," }",{"type":39,"tag":67,"props":96,"children":97},{"style":74},[98],{"type":45,"value":99}," from",{"type":39,"tag":67,"props":101,"children":102},{"style":80},[103],{"type":45,"value":104}," \"",{"type":39,"tag":67,"props":106,"children":108},{"style":107},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[109],{"type":45,"value":8},{"type":39,"tag":67,"props":111,"children":112},{"style":80},[113],{"type":45,"value":114},"\"",{"type":39,"tag":67,"props":116,"children":117},{"style":80},[118],{"type":45,"value":119},";\n",{"type":39,"tag":67,"props":121,"children":123},{"class":69,"line":122},2,[124],{"type":39,"tag":67,"props":125,"children":127},{"emptyLinePlaceholder":126},true,[128],{"type":45,"value":129},"\n",{"type":39,"tag":67,"props":131,"children":133},{"class":69,"line":132},3,[134,139,145,150,155,160,165],{"type":39,"tag":67,"props":135,"children":136},{"style":74},[137],{"type":45,"value":138},"export",{"type":39,"tag":67,"props":140,"children":142},{"style":141},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[143],{"type":45,"value":144}," const",{"type":39,"tag":67,"props":146,"children":147},{"style":86},[148],{"type":45,"value":149}," auth ",{"type":39,"tag":67,"props":151,"children":152},{"style":80},[153],{"type":45,"value":154},"=",{"type":39,"tag":67,"props":156,"children":158},{"style":157},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[159],{"type":45,"value":89},{"type":39,"tag":67,"props":161,"children":162},{"style":86},[163],{"type":45,"value":164},"(",{"type":39,"tag":67,"props":166,"children":167},{"style":80},[168],{"type":45,"value":169},"{\n",{"type":39,"tag":67,"props":171,"children":173},{"class":69,"line":172},4,[174,180,185,190,195,200,204,209,214],{"type":39,"tag":67,"props":175,"children":177},{"style":176},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[178],{"type":45,"value":179},"  secret",{"type":39,"tag":67,"props":181,"children":182},{"style":80},[183],{"type":45,"value":184},":",{"type":39,"tag":67,"props":186,"children":187},{"style":86},[188],{"type":45,"value":189}," process",{"type":39,"tag":67,"props":191,"children":192},{"style":80},[193],{"type":45,"value":194},".",{"type":39,"tag":67,"props":196,"children":197},{"style":86},[198],{"type":45,"value":199},"env",{"type":39,"tag":67,"props":201,"children":202},{"style":80},[203],{"type":45,"value":194},{"type":39,"tag":67,"props":205,"children":206},{"style":86},[207],{"type":45,"value":208},"BETTER_AUTH_SECRET",{"type":39,"tag":67,"props":210,"children":211},{"style":80},[212],{"type":45,"value":213},",",{"type":39,"tag":67,"props":215,"children":217},{"style":216},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[218],{"type":45,"value":219}," \u002F\u002F or via `BETTER_AUTH_SECRET` env\n",{"type":39,"tag":67,"props":221,"children":223},{"class":69,"line":222},5,[224,229,234],{"type":39,"tag":67,"props":225,"children":226},{"style":80},[227],{"type":45,"value":228},"}",{"type":39,"tag":67,"props":230,"children":231},{"style":86},[232],{"type":45,"value":233},")",{"type":39,"tag":67,"props":235,"children":236},{"style":80},[237],{"type":45,"value":119},{"type":39,"tag":239,"props":240,"children":241},"p",{},[242],{"type":45,"value":243},"Better Auth looks for secrets in this order:",{"type":39,"tag":245,"props":246,"children":247},"ol",{},[248,260,270],{"type":39,"tag":249,"props":250,"children":251},"li",{},[252,258],{"type":39,"tag":63,"props":253,"children":255},{"className":254},[],[256],{"type":45,"value":257},"options.secret",{"type":45,"value":259}," in your config",{"type":39,"tag":249,"props":261,"children":262},{},[263,268],{"type":39,"tag":63,"props":264,"children":266},{"className":265},[],[267],{"type":45,"value":208},{"type":45,"value":269}," environment variable",{"type":39,"tag":249,"props":271,"children":272},{},[273,279],{"type":39,"tag":63,"props":274,"children":276},{"className":275},[],[277],{"type":45,"value":278},"AUTH_SECRET",{"type":45,"value":269},{"type":39,"tag":48,"props":281,"children":283},{"id":282},"secret-requirements",[284],{"type":45,"value":285},"Secret Requirements",{"type":39,"tag":287,"props":288,"children":289},"ul",{},[290,295,300,311],{"type":39,"tag":249,"props":291,"children":292},{},[293],{"type":45,"value":294},"Rejects default\u002Fplaceholder secrets in production",{"type":39,"tag":249,"props":296,"children":297},{},[298],{"type":45,"value":299},"Warns if shorter than 32 characters or entropy below 120 bits",{"type":39,"tag":249,"props":301,"children":302},{},[303,305],{"type":45,"value":304},"Generate: ",{"type":39,"tag":63,"props":306,"children":308},{"className":307},[],[309],{"type":45,"value":310},"openssl rand -base64 32",{"type":39,"tag":249,"props":312,"children":313},{},[314],{"type":45,"value":315},"Never commit secrets to version control",{"type":39,"tag":40,"props":317,"children":319},{"id":318},"rate-limiting",[320],{"type":45,"value":321},"Rate Limiting",{"type":39,"tag":239,"props":323,"children":324},{},[325],{"type":45,"value":326},"Enabled in production by default. Applies to all endpoints. Plugins can override per-endpoint.",{"type":39,"tag":48,"props":328,"children":330},{"id":329},"default-configuration",[331],{"type":45,"value":332},"Default Configuration",{"type":39,"tag":55,"props":334,"children":336},{"className":57,"code":335,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  rateLimit: {\n    enabled: true, \u002F\u002F Default: true in production\n    window: 10, \u002F\u002F Time window in seconds (default: 10)\n    max: 100, \u002F\u002F Max requests per window (default: 100)\n  },\n});\n",[337],{"type":39,"tag":63,"props":338,"children":339},{"__ignoreMap":60},[340,379,386,417,434,461,489,516,525],{"type":39,"tag":67,"props":341,"children":342},{"class":69,"line":70},[343,347,351,355,359,363,367,371,375],{"type":39,"tag":67,"props":344,"children":345},{"style":74},[346],{"type":45,"value":77},{"type":39,"tag":67,"props":348,"children":349},{"style":80},[350],{"type":45,"value":83},{"type":39,"tag":67,"props":352,"children":353},{"style":86},[354],{"type":45,"value":89},{"type":39,"tag":67,"props":356,"children":357},{"style":80},[358],{"type":45,"value":94},{"type":39,"tag":67,"props":360,"children":361},{"style":74},[362],{"type":45,"value":99},{"type":39,"tag":67,"props":364,"children":365},{"style":80},[366],{"type":45,"value":104},{"type":39,"tag":67,"props":368,"children":369},{"style":107},[370],{"type":45,"value":8},{"type":39,"tag":67,"props":372,"children":373},{"style":80},[374],{"type":45,"value":114},{"type":39,"tag":67,"props":376,"children":377},{"style":80},[378],{"type":45,"value":119},{"type":39,"tag":67,"props":380,"children":381},{"class":69,"line":122},[382],{"type":39,"tag":67,"props":383,"children":384},{"emptyLinePlaceholder":126},[385],{"type":45,"value":129},{"type":39,"tag":67,"props":387,"children":388},{"class":69,"line":132},[389,393,397,401,405,409,413],{"type":39,"tag":67,"props":390,"children":391},{"style":74},[392],{"type":45,"value":138},{"type":39,"tag":67,"props":394,"children":395},{"style":141},[396],{"type":45,"value":144},{"type":39,"tag":67,"props":398,"children":399},{"style":86},[400],{"type":45,"value":149},{"type":39,"tag":67,"props":402,"children":403},{"style":80},[404],{"type":45,"value":154},{"type":39,"tag":67,"props":406,"children":407},{"style":157},[408],{"type":45,"value":89},{"type":39,"tag":67,"props":410,"children":411},{"style":86},[412],{"type":45,"value":164},{"type":39,"tag":67,"props":414,"children":415},{"style":80},[416],{"type":45,"value":169},{"type":39,"tag":67,"props":418,"children":419},{"class":69,"line":172},[420,425,429],{"type":39,"tag":67,"props":421,"children":422},{"style":176},[423],{"type":45,"value":424},"  rateLimit",{"type":39,"tag":67,"props":426,"children":427},{"style":80},[428],{"type":45,"value":184},{"type":39,"tag":67,"props":430,"children":431},{"style":80},[432],{"type":45,"value":433}," {\n",{"type":39,"tag":67,"props":435,"children":436},{"class":69,"line":222},[437,442,446,452,456],{"type":39,"tag":67,"props":438,"children":439},{"style":176},[440],{"type":45,"value":441},"    enabled",{"type":39,"tag":67,"props":443,"children":444},{"style":80},[445],{"type":45,"value":184},{"type":39,"tag":67,"props":447,"children":449},{"style":448},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[450],{"type":45,"value":451}," true",{"type":39,"tag":67,"props":453,"children":454},{"style":80},[455],{"type":45,"value":213},{"type":39,"tag":67,"props":457,"children":458},{"style":216},[459],{"type":45,"value":460}," \u002F\u002F Default: true in production\n",{"type":39,"tag":67,"props":462,"children":464},{"class":69,"line":463},6,[465,470,474,480,484],{"type":39,"tag":67,"props":466,"children":467},{"style":176},[468],{"type":45,"value":469},"    window",{"type":39,"tag":67,"props":471,"children":472},{"style":80},[473],{"type":45,"value":184},{"type":39,"tag":67,"props":475,"children":477},{"style":476},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[478],{"type":45,"value":479}," 10",{"type":39,"tag":67,"props":481,"children":482},{"style":80},[483],{"type":45,"value":213},{"type":39,"tag":67,"props":485,"children":486},{"style":216},[487],{"type":45,"value":488}," \u002F\u002F Time window in seconds (default: 10)\n",{"type":39,"tag":67,"props":490,"children":492},{"class":69,"line":491},7,[493,498,502,507,511],{"type":39,"tag":67,"props":494,"children":495},{"style":176},[496],{"type":45,"value":497},"    max",{"type":39,"tag":67,"props":499,"children":500},{"style":80},[501],{"type":45,"value":184},{"type":39,"tag":67,"props":503,"children":504},{"style":476},[505],{"type":45,"value":506}," 100",{"type":39,"tag":67,"props":508,"children":509},{"style":80},[510],{"type":45,"value":213},{"type":39,"tag":67,"props":512,"children":513},{"style":216},[514],{"type":45,"value":515}," \u002F\u002F Max requests per window (default: 100)\n",{"type":39,"tag":67,"props":517,"children":519},{"class":69,"line":518},8,[520],{"type":39,"tag":67,"props":521,"children":522},{"style":80},[523],{"type":45,"value":524},"  },\n",{"type":39,"tag":67,"props":526,"children":528},{"class":69,"line":527},9,[529,533,537],{"type":39,"tag":67,"props":530,"children":531},{"style":80},[532],{"type":45,"value":228},{"type":39,"tag":67,"props":534,"children":535},{"style":86},[536],{"type":45,"value":233},{"type":39,"tag":67,"props":538,"children":539},{"style":80},[540],{"type":45,"value":119},{"type":39,"tag":48,"props":542,"children":544},{"id":543},"storage-options",[545],{"type":45,"value":546},"Storage Options",{"type":39,"tag":239,"props":548,"children":549},{},[550,552,558,560,566,568,574],{"type":45,"value":551},"Options: ",{"type":39,"tag":63,"props":553,"children":555},{"className":554},[],[556],{"type":45,"value":557},"\"memory\"",{"type":45,"value":559}," (resets on restart, avoid on serverless), ",{"type":39,"tag":63,"props":561,"children":563},{"className":562},[],[564],{"type":45,"value":565},"\"database\"",{"type":45,"value":567}," (persistent), ",{"type":39,"tag":63,"props":569,"children":571},{"className":570},[],[572],{"type":45,"value":573},"\"secondary-storage\"",{"type":45,"value":575}," (Redis, default when available).",{"type":39,"tag":55,"props":577,"children":579},{"className":57,"code":578,"language":59,"meta":60,"style":60},"rateLimit: {\n  storage: \"database\",\n}\n",[580],{"type":39,"tag":63,"props":581,"children":582},{"__ignoreMap":60},[583,600,630],{"type":39,"tag":67,"props":584,"children":585},{"class":69,"line":70},[586,592,596],{"type":39,"tag":67,"props":587,"children":589},{"style":588},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[590],{"type":45,"value":591},"rateLimit",{"type":39,"tag":67,"props":593,"children":594},{"style":80},[595],{"type":45,"value":184},{"type":39,"tag":67,"props":597,"children":598},{"style":80},[599],{"type":45,"value":433},{"type":39,"tag":67,"props":601,"children":602},{"class":69,"line":122},[603,608,612,616,621,625],{"type":39,"tag":67,"props":604,"children":605},{"style":588},[606],{"type":45,"value":607},"  storage",{"type":39,"tag":67,"props":609,"children":610},{"style":80},[611],{"type":45,"value":184},{"type":39,"tag":67,"props":613,"children":614},{"style":80},[615],{"type":45,"value":104},{"type":39,"tag":67,"props":617,"children":618},{"style":107},[619],{"type":45,"value":620},"database",{"type":39,"tag":67,"props":622,"children":623},{"style":80},[624],{"type":45,"value":114},{"type":39,"tag":67,"props":626,"children":627},{"style":80},[628],{"type":45,"value":629},",\n",{"type":39,"tag":67,"props":631,"children":632},{"class":69,"line":132},[633],{"type":39,"tag":67,"props":634,"children":635},{"style":80},[636],{"type":45,"value":637},"}\n",{"type":39,"tag":48,"props":639,"children":641},{"id":640},"custom-storage",[642],{"type":45,"value":643},"Custom Storage",{"type":39,"tag":239,"props":645,"children":646},{},[647],{"type":45,"value":648},"Implement your own rate limit storage:",{"type":39,"tag":55,"props":650,"children":652},{"className":57,"code":651,"language":59,"meta":60,"style":60},"rateLimit: {\n  customStorage: {\n    get: async (key) => {\n      \u002F\u002F Return { count: number, expiresAt: number } or null\n    },\n    set: async (key, data) => {\n      \u002F\u002F Store the rate limit data\n    },\n  },\n}\n",[653],{"type":39,"tag":63,"props":654,"children":655},{"__ignoreMap":60},[656,671,687,728,736,744,789,797,804,811],{"type":39,"tag":67,"props":657,"children":658},{"class":69,"line":70},[659,663,667],{"type":39,"tag":67,"props":660,"children":661},{"style":588},[662],{"type":45,"value":591},{"type":39,"tag":67,"props":664,"children":665},{"style":80},[666],{"type":45,"value":184},{"type":39,"tag":67,"props":668,"children":669},{"style":80},[670],{"type":45,"value":433},{"type":39,"tag":67,"props":672,"children":673},{"class":69,"line":122},[674,679,683],{"type":39,"tag":67,"props":675,"children":676},{"style":588},[677],{"type":45,"value":678},"  customStorage",{"type":39,"tag":67,"props":680,"children":681},{"style":80},[682],{"type":45,"value":184},{"type":39,"tag":67,"props":684,"children":685},{"style":80},[686],{"type":45,"value":433},{"type":39,"tag":67,"props":688,"children":689},{"class":69,"line":132},[690,695,699,704,709,715,719,724],{"type":39,"tag":67,"props":691,"children":692},{"style":588},[693],{"type":45,"value":694},"    get",{"type":39,"tag":67,"props":696,"children":697},{"style":80},[698],{"type":45,"value":184},{"type":39,"tag":67,"props":700,"children":701},{"style":141},[702],{"type":45,"value":703}," async",{"type":39,"tag":67,"props":705,"children":706},{"style":80},[707],{"type":45,"value":708}," (",{"type":39,"tag":67,"props":710,"children":712},{"style":711},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[713],{"type":45,"value":714},"key",{"type":39,"tag":67,"props":716,"children":717},{"style":80},[718],{"type":45,"value":233},{"type":39,"tag":67,"props":720,"children":721},{"style":141},[722],{"type":45,"value":723}," =>",{"type":39,"tag":67,"props":725,"children":726},{"style":80},[727],{"type":45,"value":433},{"type":39,"tag":67,"props":729,"children":730},{"class":69,"line":172},[731],{"type":39,"tag":67,"props":732,"children":733},{"style":216},[734],{"type":45,"value":735},"      \u002F\u002F Return { count: number, expiresAt: number } or null\n",{"type":39,"tag":67,"props":737,"children":738},{"class":69,"line":222},[739],{"type":39,"tag":67,"props":740,"children":741},{"style":80},[742],{"type":45,"value":743},"    },\n",{"type":39,"tag":67,"props":745,"children":746},{"class":69,"line":463},[747,752,756,760,764,768,772,777,781,785],{"type":39,"tag":67,"props":748,"children":749},{"style":588},[750],{"type":45,"value":751},"    set",{"type":39,"tag":67,"props":753,"children":754},{"style":80},[755],{"type":45,"value":184},{"type":39,"tag":67,"props":757,"children":758},{"style":141},[759],{"type":45,"value":703},{"type":39,"tag":67,"props":761,"children":762},{"style":80},[763],{"type":45,"value":708},{"type":39,"tag":67,"props":765,"children":766},{"style":711},[767],{"type":45,"value":714},{"type":39,"tag":67,"props":769,"children":770},{"style":80},[771],{"type":45,"value":213},{"type":39,"tag":67,"props":773,"children":774},{"style":711},[775],{"type":45,"value":776}," data",{"type":39,"tag":67,"props":778,"children":779},{"style":80},[780],{"type":45,"value":233},{"type":39,"tag":67,"props":782,"children":783},{"style":141},[784],{"type":45,"value":723},{"type":39,"tag":67,"props":786,"children":787},{"style":80},[788],{"type":45,"value":433},{"type":39,"tag":67,"props":790,"children":791},{"class":69,"line":491},[792],{"type":39,"tag":67,"props":793,"children":794},{"style":216},[795],{"type":45,"value":796},"      \u002F\u002F Store the rate limit data\n",{"type":39,"tag":67,"props":798,"children":799},{"class":69,"line":518},[800],{"type":39,"tag":67,"props":801,"children":802},{"style":80},[803],{"type":45,"value":743},{"type":39,"tag":67,"props":805,"children":806},{"class":69,"line":527},[807],{"type":39,"tag":67,"props":808,"children":809},{"style":80},[810],{"type":45,"value":524},{"type":39,"tag":67,"props":812,"children":814},{"class":69,"line":813},10,[815],{"type":39,"tag":67,"props":816,"children":817},{"style":80},[818],{"type":45,"value":637},{"type":39,"tag":48,"props":820,"children":822},{"id":821},"per-endpoint-rules",[823],{"type":45,"value":824},"Per-Endpoint Rules",{"type":39,"tag":239,"props":826,"children":827},{},[828,830,836,838,844,845,851,852,858],{"type":45,"value":829},"Sensitive endpoints default to 3 requests per 10 seconds (",{"type":39,"tag":63,"props":831,"children":833},{"className":832},[],[834],{"type":45,"value":835},"\u002Fsign-in",{"type":45,"value":837},", ",{"type":39,"tag":63,"props":839,"children":841},{"className":840},[],[842],{"type":45,"value":843},"\u002Fsign-up",{"type":45,"value":837},{"type":39,"tag":63,"props":846,"children":848},{"className":847},[],[849],{"type":45,"value":850},"\u002Fchange-password",{"type":45,"value":837},{"type":39,"tag":63,"props":853,"children":855},{"className":854},[],[856],{"type":45,"value":857},"\u002Fchange-email",{"type":45,"value":859},"). Override:",{"type":39,"tag":55,"props":861,"children":863},{"className":57,"code":862,"language":59,"meta":60,"style":60},"rateLimit: {\n  customRules: {\n    \"\u002Fapi\u002Fauth\u002Fsign-in\u002Femail\": {\n      window: 60, \u002F\u002F 1 minute window\n      max: 5, \u002F\u002F 5 attempts\n    },\n    \"\u002Fapi\u002Fauth\u002Fsome-safe-endpoint\": false, \u002F\u002F Disable rate limiting\n  },\n}\n",[864],{"type":39,"tag":63,"props":865,"children":866},{"__ignoreMap":60},[867,882,898,924,950,976,983,1017,1024],{"type":39,"tag":67,"props":868,"children":869},{"class":69,"line":70},[870,874,878],{"type":39,"tag":67,"props":871,"children":872},{"style":588},[873],{"type":45,"value":591},{"type":39,"tag":67,"props":875,"children":876},{"style":80},[877],{"type":45,"value":184},{"type":39,"tag":67,"props":879,"children":880},{"style":80},[881],{"type":45,"value":433},{"type":39,"tag":67,"props":883,"children":884},{"class":69,"line":122},[885,890,894],{"type":39,"tag":67,"props":886,"children":887},{"style":588},[888],{"type":45,"value":889},"  customRules",{"type":39,"tag":67,"props":891,"children":892},{"style":80},[893],{"type":45,"value":184},{"type":39,"tag":67,"props":895,"children":896},{"style":80},[897],{"type":45,"value":433},{"type":39,"tag":67,"props":899,"children":900},{"class":69,"line":132},[901,906,911,915,920],{"type":39,"tag":67,"props":902,"children":903},{"style":80},[904],{"type":45,"value":905},"    \"",{"type":39,"tag":67,"props":907,"children":908},{"style":107},[909],{"type":45,"value":910},"\u002Fapi\u002Fauth\u002Fsign-in\u002Femail",{"type":39,"tag":67,"props":912,"children":913},{"style":80},[914],{"type":45,"value":114},{"type":39,"tag":67,"props":916,"children":917},{"style":176},[918],{"type":45,"value":919},": ",{"type":39,"tag":67,"props":921,"children":922},{"style":80},[923],{"type":45,"value":169},{"type":39,"tag":67,"props":925,"children":926},{"class":69,"line":172},[927,932,936,941,945],{"type":39,"tag":67,"props":928,"children":929},{"style":176},[930],{"type":45,"value":931},"      window",{"type":39,"tag":67,"props":933,"children":934},{"style":80},[935],{"type":45,"value":184},{"type":39,"tag":67,"props":937,"children":938},{"style":476},[939],{"type":45,"value":940}," 60",{"type":39,"tag":67,"props":942,"children":943},{"style":80},[944],{"type":45,"value":213},{"type":39,"tag":67,"props":946,"children":947},{"style":216},[948],{"type":45,"value":949}," \u002F\u002F 1 minute window\n",{"type":39,"tag":67,"props":951,"children":952},{"class":69,"line":222},[953,958,962,967,971],{"type":39,"tag":67,"props":954,"children":955},{"style":176},[956],{"type":45,"value":957},"      max",{"type":39,"tag":67,"props":959,"children":960},{"style":80},[961],{"type":45,"value":184},{"type":39,"tag":67,"props":963,"children":964},{"style":476},[965],{"type":45,"value":966}," 5",{"type":39,"tag":67,"props":968,"children":969},{"style":80},[970],{"type":45,"value":213},{"type":39,"tag":67,"props":972,"children":973},{"style":216},[974],{"type":45,"value":975}," \u002F\u002F 5 attempts\n",{"type":39,"tag":67,"props":977,"children":978},{"class":69,"line":463},[979],{"type":39,"tag":67,"props":980,"children":981},{"style":80},[982],{"type":45,"value":743},{"type":39,"tag":67,"props":984,"children":985},{"class":69,"line":491},[986,990,995,999,1003,1008,1012],{"type":39,"tag":67,"props":987,"children":988},{"style":80},[989],{"type":45,"value":905},{"type":39,"tag":67,"props":991,"children":992},{"style":107},[993],{"type":45,"value":994},"\u002Fapi\u002Fauth\u002Fsome-safe-endpoint",{"type":39,"tag":67,"props":996,"children":997},{"style":80},[998],{"type":45,"value":114},{"type":39,"tag":67,"props":1000,"children":1001},{"style":176},[1002],{"type":45,"value":919},{"type":39,"tag":67,"props":1004,"children":1005},{"style":448},[1006],{"type":45,"value":1007},"false",{"type":39,"tag":67,"props":1009,"children":1010},{"style":80},[1011],{"type":45,"value":213},{"type":39,"tag":67,"props":1013,"children":1014},{"style":216},[1015],{"type":45,"value":1016}," \u002F\u002F Disable rate limiting\n",{"type":39,"tag":67,"props":1018,"children":1019},{"class":69,"line":518},[1020],{"type":39,"tag":67,"props":1021,"children":1022},{"style":80},[1023],{"type":45,"value":524},{"type":39,"tag":67,"props":1025,"children":1026},{"class":69,"line":527},[1027],{"type":39,"tag":67,"props":1028,"children":1029},{"style":80},[1030],{"type":45,"value":637},{"type":39,"tag":40,"props":1032,"children":1034},{"id":1033},"csrf-protection",[1035],{"type":45,"value":1036},"CSRF Protection",{"type":39,"tag":239,"props":1038,"children":1039},{},[1040],{"type":45,"value":1041},"Multi-layer protection: origin header validation, Fetch Metadata checks, and first-login protection.",{"type":39,"tag":48,"props":1043,"children":1045},{"id":1044},"configuration",[1046],{"type":45,"value":1047},"Configuration",{"type":39,"tag":55,"props":1049,"children":1051},{"className":57,"code":1050,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    disableCSRFCheck: false, \u002F\u002F Default: false (keep enabled)\n  },\n});\n",[1052],{"type":39,"tag":63,"props":1053,"children":1054},{"__ignoreMap":60},[1055,1094,1101,1132,1148,1174,1181],{"type":39,"tag":67,"props":1056,"children":1057},{"class":69,"line":70},[1058,1062,1066,1070,1074,1078,1082,1086,1090],{"type":39,"tag":67,"props":1059,"children":1060},{"style":74},[1061],{"type":45,"value":77},{"type":39,"tag":67,"props":1063,"children":1064},{"style":80},[1065],{"type":45,"value":83},{"type":39,"tag":67,"props":1067,"children":1068},{"style":86},[1069],{"type":45,"value":89},{"type":39,"tag":67,"props":1071,"children":1072},{"style":80},[1073],{"type":45,"value":94},{"type":39,"tag":67,"props":1075,"children":1076},{"style":74},[1077],{"type":45,"value":99},{"type":39,"tag":67,"props":1079,"children":1080},{"style":80},[1081],{"type":45,"value":104},{"type":39,"tag":67,"props":1083,"children":1084},{"style":107},[1085],{"type":45,"value":8},{"type":39,"tag":67,"props":1087,"children":1088},{"style":80},[1089],{"type":45,"value":114},{"type":39,"tag":67,"props":1091,"children":1092},{"style":80},[1093],{"type":45,"value":119},{"type":39,"tag":67,"props":1095,"children":1096},{"class":69,"line":122},[1097],{"type":39,"tag":67,"props":1098,"children":1099},{"emptyLinePlaceholder":126},[1100],{"type":45,"value":129},{"type":39,"tag":67,"props":1102,"children":1103},{"class":69,"line":132},[1104,1108,1112,1116,1120,1124,1128],{"type":39,"tag":67,"props":1105,"children":1106},{"style":74},[1107],{"type":45,"value":138},{"type":39,"tag":67,"props":1109,"children":1110},{"style":141},[1111],{"type":45,"value":144},{"type":39,"tag":67,"props":1113,"children":1114},{"style":86},[1115],{"type":45,"value":149},{"type":39,"tag":67,"props":1117,"children":1118},{"style":80},[1119],{"type":45,"value":154},{"type":39,"tag":67,"props":1121,"children":1122},{"style":157},[1123],{"type":45,"value":89},{"type":39,"tag":67,"props":1125,"children":1126},{"style":86},[1127],{"type":45,"value":164},{"type":39,"tag":67,"props":1129,"children":1130},{"style":80},[1131],{"type":45,"value":169},{"type":39,"tag":67,"props":1133,"children":1134},{"class":69,"line":172},[1135,1140,1144],{"type":39,"tag":67,"props":1136,"children":1137},{"style":176},[1138],{"type":45,"value":1139},"  advanced",{"type":39,"tag":67,"props":1141,"children":1142},{"style":80},[1143],{"type":45,"value":184},{"type":39,"tag":67,"props":1145,"children":1146},{"style":80},[1147],{"type":45,"value":433},{"type":39,"tag":67,"props":1149,"children":1150},{"class":69,"line":222},[1151,1156,1160,1165,1169],{"type":39,"tag":67,"props":1152,"children":1153},{"style":176},[1154],{"type":45,"value":1155},"    disableCSRFCheck",{"type":39,"tag":67,"props":1157,"children":1158},{"style":80},[1159],{"type":45,"value":184},{"type":39,"tag":67,"props":1161,"children":1162},{"style":448},[1163],{"type":45,"value":1164}," false",{"type":39,"tag":67,"props":1166,"children":1167},{"style":80},[1168],{"type":45,"value":213},{"type":39,"tag":67,"props":1170,"children":1171},{"style":216},[1172],{"type":45,"value":1173}," \u002F\u002F Default: false (keep enabled)\n",{"type":39,"tag":67,"props":1175,"children":1176},{"class":69,"line":463},[1177],{"type":39,"tag":67,"props":1178,"children":1179},{"style":80},[1180],{"type":45,"value":524},{"type":39,"tag":67,"props":1182,"children":1183},{"class":69,"line":491},[1184,1188,1192],{"type":39,"tag":67,"props":1185,"children":1186},{"style":80},[1187],{"type":45,"value":228},{"type":39,"tag":67,"props":1189,"children":1190},{"style":86},[1191],{"type":45,"value":233},{"type":39,"tag":67,"props":1193,"children":1194},{"style":80},[1195],{"type":45,"value":119},{"type":39,"tag":239,"props":1197,"children":1198},{},[1199],{"type":45,"value":1200},"Only disable for testing or with an alternative CSRF mechanism.",{"type":39,"tag":40,"props":1202,"children":1204},{"id":1203},"trusted-origins",[1205],{"type":45,"value":1206},"Trusted Origins",{"type":39,"tag":48,"props":1208,"children":1210},{"id":1209},"configuring-trusted-origins",[1211],{"type":45,"value":1212},"Configuring Trusted Origins",{"type":39,"tag":55,"props":1214,"children":1216},{"className":57,"code":1215,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  baseURL: \"https:\u002F\u002Fapi.example.com\",\n  trustedOrigins: [\n    \"https:\u002F\u002Fapp.example.com\",\n    \"https:\u002F\u002Fadmin.example.com\",\n  ],\n});\n",[1217],{"type":39,"tag":63,"props":1218,"children":1219},{"__ignoreMap":60},[1220,1259,1266,1297,1326,1343,1363,1383,1395],{"type":39,"tag":67,"props":1221,"children":1222},{"class":69,"line":70},[1223,1227,1231,1235,1239,1243,1247,1251,1255],{"type":39,"tag":67,"props":1224,"children":1225},{"style":74},[1226],{"type":45,"value":77},{"type":39,"tag":67,"props":1228,"children":1229},{"style":80},[1230],{"type":45,"value":83},{"type":39,"tag":67,"props":1232,"children":1233},{"style":86},[1234],{"type":45,"value":89},{"type":39,"tag":67,"props":1236,"children":1237},{"style":80},[1238],{"type":45,"value":94},{"type":39,"tag":67,"props":1240,"children":1241},{"style":74},[1242],{"type":45,"value":99},{"type":39,"tag":67,"props":1244,"children":1245},{"style":80},[1246],{"type":45,"value":104},{"type":39,"tag":67,"props":1248,"children":1249},{"style":107},[1250],{"type":45,"value":8},{"type":39,"tag":67,"props":1252,"children":1253},{"style":80},[1254],{"type":45,"value":114},{"type":39,"tag":67,"props":1256,"children":1257},{"style":80},[1258],{"type":45,"value":119},{"type":39,"tag":67,"props":1260,"children":1261},{"class":69,"line":122},[1262],{"type":39,"tag":67,"props":1263,"children":1264},{"emptyLinePlaceholder":126},[1265],{"type":45,"value":129},{"type":39,"tag":67,"props":1267,"children":1268},{"class":69,"line":132},[1269,1273,1277,1281,1285,1289,1293],{"type":39,"tag":67,"props":1270,"children":1271},{"style":74},[1272],{"type":45,"value":138},{"type":39,"tag":67,"props":1274,"children":1275},{"style":141},[1276],{"type":45,"value":144},{"type":39,"tag":67,"props":1278,"children":1279},{"style":86},[1280],{"type":45,"value":149},{"type":39,"tag":67,"props":1282,"children":1283},{"style":80},[1284],{"type":45,"value":154},{"type":39,"tag":67,"props":1286,"children":1287},{"style":157},[1288],{"type":45,"value":89},{"type":39,"tag":67,"props":1290,"children":1291},{"style":86},[1292],{"type":45,"value":164},{"type":39,"tag":67,"props":1294,"children":1295},{"style":80},[1296],{"type":45,"value":169},{"type":39,"tag":67,"props":1298,"children":1299},{"class":69,"line":172},[1300,1305,1309,1313,1318,1322],{"type":39,"tag":67,"props":1301,"children":1302},{"style":176},[1303],{"type":45,"value":1304},"  baseURL",{"type":39,"tag":67,"props":1306,"children":1307},{"style":80},[1308],{"type":45,"value":184},{"type":39,"tag":67,"props":1310,"children":1311},{"style":80},[1312],{"type":45,"value":104},{"type":39,"tag":67,"props":1314,"children":1315},{"style":107},[1316],{"type":45,"value":1317},"https:\u002F\u002Fapi.example.com",{"type":39,"tag":67,"props":1319,"children":1320},{"style":80},[1321],{"type":45,"value":114},{"type":39,"tag":67,"props":1323,"children":1324},{"style":80},[1325],{"type":45,"value":629},{"type":39,"tag":67,"props":1327,"children":1328},{"class":69,"line":222},[1329,1334,1338],{"type":39,"tag":67,"props":1330,"children":1331},{"style":176},[1332],{"type":45,"value":1333},"  trustedOrigins",{"type":39,"tag":67,"props":1335,"children":1336},{"style":80},[1337],{"type":45,"value":184},{"type":39,"tag":67,"props":1339,"children":1340},{"style":86},[1341],{"type":45,"value":1342}," [\n",{"type":39,"tag":67,"props":1344,"children":1345},{"class":69,"line":463},[1346,1350,1355,1359],{"type":39,"tag":67,"props":1347,"children":1348},{"style":80},[1349],{"type":45,"value":905},{"type":39,"tag":67,"props":1351,"children":1352},{"style":107},[1353],{"type":45,"value":1354},"https:\u002F\u002Fapp.example.com",{"type":39,"tag":67,"props":1356,"children":1357},{"style":80},[1358],{"type":45,"value":114},{"type":39,"tag":67,"props":1360,"children":1361},{"style":80},[1362],{"type":45,"value":629},{"type":39,"tag":67,"props":1364,"children":1365},{"class":69,"line":491},[1366,1370,1375,1379],{"type":39,"tag":67,"props":1367,"children":1368},{"style":80},[1369],{"type":45,"value":905},{"type":39,"tag":67,"props":1371,"children":1372},{"style":107},[1373],{"type":45,"value":1374},"https:\u002F\u002Fadmin.example.com",{"type":39,"tag":67,"props":1376,"children":1377},{"style":80},[1378],{"type":45,"value":114},{"type":39,"tag":67,"props":1380,"children":1381},{"style":80},[1382],{"type":45,"value":629},{"type":39,"tag":67,"props":1384,"children":1385},{"class":69,"line":518},[1386,1391],{"type":39,"tag":67,"props":1387,"children":1388},{"style":86},[1389],{"type":45,"value":1390},"  ]",{"type":39,"tag":67,"props":1392,"children":1393},{"style":80},[1394],{"type":45,"value":629},{"type":39,"tag":67,"props":1396,"children":1397},{"class":69,"line":527},[1398,1402,1406],{"type":39,"tag":67,"props":1399,"children":1400},{"style":80},[1401],{"type":45,"value":228},{"type":39,"tag":67,"props":1403,"children":1404},{"style":86},[1405],{"type":45,"value":233},{"type":39,"tag":67,"props":1407,"children":1408},{"style":80},[1409],{"type":45,"value":119},{"type":39,"tag":239,"props":1411,"children":1412},{},[1413,1415,1421,1423],{"type":45,"value":1414},"The ",{"type":39,"tag":63,"props":1416,"children":1418},{"className":1417},[],[1419],{"type":45,"value":1420},"baseURL",{"type":45,"value":1422}," origin is automatically trusted. Also configurable via env: ",{"type":39,"tag":63,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":45,"value":1428},"BETTER_AUTH_TRUSTED_ORIGINS=https:\u002F\u002Fapp.example.com,https:\u002F\u002Fadmin.example.com",{"type":39,"tag":48,"props":1430,"children":1432},{"id":1431},"wildcard-patterns",[1433],{"type":45,"value":1434},"Wildcard Patterns",{"type":39,"tag":55,"props":1436,"children":1438},{"className":57,"code":1437,"language":59,"meta":60,"style":60},"trustedOrigins: [\n  \"*.example.com\", \u002F\u002F Matches any subdomain\n  \"https:\u002F\u002F*.example.com\", \u002F\u002F Protocol-specific wildcard\n  \"exp:\u002F\u002F192.168.*.*:*\u002F*\", \u002F\u002F Custom schemes (e.g., Expo)\n]\n",[1439],{"type":39,"tag":63,"props":1440,"children":1441},{"__ignoreMap":60},[1442,1458,1484,1509,1534],{"type":39,"tag":67,"props":1443,"children":1444},{"class":69,"line":70},[1445,1450,1454],{"type":39,"tag":67,"props":1446,"children":1447},{"style":588},[1448],{"type":45,"value":1449},"trustedOrigins",{"type":39,"tag":67,"props":1451,"children":1452},{"style":80},[1453],{"type":45,"value":184},{"type":39,"tag":67,"props":1455,"children":1456},{"style":86},[1457],{"type":45,"value":1342},{"type":39,"tag":67,"props":1459,"children":1460},{"class":69,"line":122},[1461,1466,1471,1475,1479],{"type":39,"tag":67,"props":1462,"children":1463},{"style":80},[1464],{"type":45,"value":1465},"  \"",{"type":39,"tag":67,"props":1467,"children":1468},{"style":107},[1469],{"type":45,"value":1470},"*.example.com",{"type":39,"tag":67,"props":1472,"children":1473},{"style":80},[1474],{"type":45,"value":114},{"type":39,"tag":67,"props":1476,"children":1477},{"style":80},[1478],{"type":45,"value":213},{"type":39,"tag":67,"props":1480,"children":1481},{"style":216},[1482],{"type":45,"value":1483}," \u002F\u002F Matches any subdomain\n",{"type":39,"tag":67,"props":1485,"children":1486},{"class":69,"line":132},[1487,1491,1496,1500,1504],{"type":39,"tag":67,"props":1488,"children":1489},{"style":80},[1490],{"type":45,"value":1465},{"type":39,"tag":67,"props":1492,"children":1493},{"style":107},[1494],{"type":45,"value":1495},"https:\u002F\u002F*.example.com",{"type":39,"tag":67,"props":1497,"children":1498},{"style":80},[1499],{"type":45,"value":114},{"type":39,"tag":67,"props":1501,"children":1502},{"style":80},[1503],{"type":45,"value":213},{"type":39,"tag":67,"props":1505,"children":1506},{"style":216},[1507],{"type":45,"value":1508}," \u002F\u002F Protocol-specific wildcard\n",{"type":39,"tag":67,"props":1510,"children":1511},{"class":69,"line":172},[1512,1516,1521,1525,1529],{"type":39,"tag":67,"props":1513,"children":1514},{"style":80},[1515],{"type":45,"value":1465},{"type":39,"tag":67,"props":1517,"children":1518},{"style":107},[1519],{"type":45,"value":1520},"exp:\u002F\u002F192.168.*.*:*\u002F*",{"type":39,"tag":67,"props":1522,"children":1523},{"style":80},[1524],{"type":45,"value":114},{"type":39,"tag":67,"props":1526,"children":1527},{"style":80},[1528],{"type":45,"value":213},{"type":39,"tag":67,"props":1530,"children":1531},{"style":216},[1532],{"type":45,"value":1533}," \u002F\u002F Custom schemes (e.g., Expo)\n",{"type":39,"tag":67,"props":1535,"children":1536},{"class":69,"line":222},[1537],{"type":39,"tag":67,"props":1538,"children":1539},{"style":86},[1540],{"type":45,"value":1541},"]\n",{"type":39,"tag":48,"props":1543,"children":1545},{"id":1544},"dynamic-trusted-origins",[1546],{"type":45,"value":1547},"Dynamic Trusted Origins",{"type":39,"tag":239,"props":1549,"children":1550},{},[1551],{"type":45,"value":1552},"Compute trusted origins based on the request:",{"type":39,"tag":55,"props":1554,"children":1556},{"className":57,"code":1555,"language":59,"meta":60,"style":60},"trustedOrigins: async (request) => {\n  \u002F\u002F Validate against database, header, etc.\n  const tenant = getTenantFromRequest(request);\n  return [`https:\u002F\u002F${tenant}.myapp.com`];\n}\n",[1557],{"type":39,"tag":63,"props":1558,"children":1559},{"__ignoreMap":60},[1560,1596,1604,1643,1698],{"type":39,"tag":67,"props":1561,"children":1562},{"class":69,"line":70},[1563,1567,1571,1575,1579,1584,1588,1592],{"type":39,"tag":67,"props":1564,"children":1565},{"style":588},[1566],{"type":45,"value":1449},{"type":39,"tag":67,"props":1568,"children":1569},{"style":80},[1570],{"type":45,"value":184},{"type":39,"tag":67,"props":1572,"children":1573},{"style":141},[1574],{"type":45,"value":703},{"type":39,"tag":67,"props":1576,"children":1577},{"style":80},[1578],{"type":45,"value":708},{"type":39,"tag":67,"props":1580,"children":1581},{"style":711},[1582],{"type":45,"value":1583},"request",{"type":39,"tag":67,"props":1585,"children":1586},{"style":80},[1587],{"type":45,"value":233},{"type":39,"tag":67,"props":1589,"children":1590},{"style":141},[1591],{"type":45,"value":723},{"type":39,"tag":67,"props":1593,"children":1594},{"style":80},[1595],{"type":45,"value":433},{"type":39,"tag":67,"props":1597,"children":1598},{"class":69,"line":122},[1599],{"type":39,"tag":67,"props":1600,"children":1601},{"style":216},[1602],{"type":45,"value":1603},"  \u002F\u002F Validate against database, header, etc.\n",{"type":39,"tag":67,"props":1605,"children":1606},{"class":69,"line":132},[1607,1612,1617,1622,1627,1631,1635,1639],{"type":39,"tag":67,"props":1608,"children":1609},{"style":141},[1610],{"type":45,"value":1611},"  const",{"type":39,"tag":67,"props":1613,"children":1614},{"style":86},[1615],{"type":45,"value":1616}," tenant",{"type":39,"tag":67,"props":1618,"children":1619},{"style":80},[1620],{"type":45,"value":1621}," =",{"type":39,"tag":67,"props":1623,"children":1624},{"style":157},[1625],{"type":45,"value":1626}," getTenantFromRequest",{"type":39,"tag":67,"props":1628,"children":1629},{"style":176},[1630],{"type":45,"value":164},{"type":39,"tag":67,"props":1632,"children":1633},{"style":86},[1634],{"type":45,"value":1583},{"type":39,"tag":67,"props":1636,"children":1637},{"style":176},[1638],{"type":45,"value":233},{"type":39,"tag":67,"props":1640,"children":1641},{"style":80},[1642],{"type":45,"value":119},{"type":39,"tag":67,"props":1644,"children":1645},{"class":69,"line":172},[1646,1651,1656,1661,1666,1671,1676,1680,1685,1689,1694],{"type":39,"tag":67,"props":1647,"children":1648},{"style":74},[1649],{"type":45,"value":1650},"  return",{"type":39,"tag":67,"props":1652,"children":1653},{"style":176},[1654],{"type":45,"value":1655}," [",{"type":39,"tag":67,"props":1657,"children":1658},{"style":80},[1659],{"type":45,"value":1660},"`",{"type":39,"tag":67,"props":1662,"children":1663},{"style":107},[1664],{"type":45,"value":1665},"https:\u002F\u002F",{"type":39,"tag":67,"props":1667,"children":1668},{"style":80},[1669],{"type":45,"value":1670},"${",{"type":39,"tag":67,"props":1672,"children":1673},{"style":86},[1674],{"type":45,"value":1675},"tenant",{"type":39,"tag":67,"props":1677,"children":1678},{"style":80},[1679],{"type":45,"value":228},{"type":39,"tag":67,"props":1681,"children":1682},{"style":107},[1683],{"type":45,"value":1684},".myapp.com",{"type":39,"tag":67,"props":1686,"children":1687},{"style":80},[1688],{"type":45,"value":1660},{"type":39,"tag":67,"props":1690,"children":1691},{"style":176},[1692],{"type":45,"value":1693},"]",{"type":39,"tag":67,"props":1695,"children":1696},{"style":80},[1697],{"type":45,"value":119},{"type":39,"tag":67,"props":1699,"children":1700},{"class":69,"line":222},[1701],{"type":39,"tag":67,"props":1702,"children":1703},{"style":80},[1704],{"type":45,"value":637},{"type":39,"tag":239,"props":1706,"children":1707},{},[1708,1710,1716,1717,1723,1724,1730,1731,1737,1739,1745],{"type":45,"value":1709},"Validates ",{"type":39,"tag":63,"props":1711,"children":1713},{"className":1712},[],[1714],{"type":45,"value":1715},"callbackURL",{"type":45,"value":837},{"type":39,"tag":63,"props":1718,"children":1720},{"className":1719},[],[1721],{"type":45,"value":1722},"redirectTo",{"type":45,"value":837},{"type":39,"tag":63,"props":1725,"children":1727},{"className":1726},[],[1728],{"type":45,"value":1729},"errorCallbackURL",{"type":45,"value":837},{"type":39,"tag":63,"props":1732,"children":1734},{"className":1733},[],[1735],{"type":45,"value":1736},"newUserCallbackURL",{"type":45,"value":1738},", and ",{"type":39,"tag":63,"props":1740,"children":1742},{"className":1741},[],[1743],{"type":45,"value":1744},"origin",{"type":45,"value":1746}," against trusted origins. Invalid URLs receive 403.",{"type":39,"tag":40,"props":1748,"children":1750},{"id":1749},"session-security",[1751],{"type":45,"value":1752},"Session Security",{"type":39,"tag":48,"props":1754,"children":1756},{"id":1755},"session-expiration",[1757],{"type":45,"value":1758},"Session Expiration",{"type":39,"tag":55,"props":1760,"children":1762},{"className":57,"code":1761,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days (default)\n    updateAge: 60 * 60 * 24, \u002F\u002F Refresh session every 24 hours (default)\n  },\n});\n",[1763],{"type":39,"tag":63,"props":1764,"children":1765},{"__ignoreMap":60},[1766,1805,1812,1843,1859,1911,1952,1959],{"type":39,"tag":67,"props":1767,"children":1768},{"class":69,"line":70},[1769,1773,1777,1781,1785,1789,1793,1797,1801],{"type":39,"tag":67,"props":1770,"children":1771},{"style":74},[1772],{"type":45,"value":77},{"type":39,"tag":67,"props":1774,"children":1775},{"style":80},[1776],{"type":45,"value":83},{"type":39,"tag":67,"props":1778,"children":1779},{"style":86},[1780],{"type":45,"value":89},{"type":39,"tag":67,"props":1782,"children":1783},{"style":80},[1784],{"type":45,"value":94},{"type":39,"tag":67,"props":1786,"children":1787},{"style":74},[1788],{"type":45,"value":99},{"type":39,"tag":67,"props":1790,"children":1791},{"style":80},[1792],{"type":45,"value":104},{"type":39,"tag":67,"props":1794,"children":1795},{"style":107},[1796],{"type":45,"value":8},{"type":39,"tag":67,"props":1798,"children":1799},{"style":80},[1800],{"type":45,"value":114},{"type":39,"tag":67,"props":1802,"children":1803},{"style":80},[1804],{"type":45,"value":119},{"type":39,"tag":67,"props":1806,"children":1807},{"class":69,"line":122},[1808],{"type":39,"tag":67,"props":1809,"children":1810},{"emptyLinePlaceholder":126},[1811],{"type":45,"value":129},{"type":39,"tag":67,"props":1813,"children":1814},{"class":69,"line":132},[1815,1819,1823,1827,1831,1835,1839],{"type":39,"tag":67,"props":1816,"children":1817},{"style":74},[1818],{"type":45,"value":138},{"type":39,"tag":67,"props":1820,"children":1821},{"style":141},[1822],{"type":45,"value":144},{"type":39,"tag":67,"props":1824,"children":1825},{"style":86},[1826],{"type":45,"value":149},{"type":39,"tag":67,"props":1828,"children":1829},{"style":80},[1830],{"type":45,"value":154},{"type":39,"tag":67,"props":1832,"children":1833},{"style":157},[1834],{"type":45,"value":89},{"type":39,"tag":67,"props":1836,"children":1837},{"style":86},[1838],{"type":45,"value":164},{"type":39,"tag":67,"props":1840,"children":1841},{"style":80},[1842],{"type":45,"value":169},{"type":39,"tag":67,"props":1844,"children":1845},{"class":69,"line":172},[1846,1851,1855],{"type":39,"tag":67,"props":1847,"children":1848},{"style":176},[1849],{"type":45,"value":1850},"  session",{"type":39,"tag":67,"props":1852,"children":1853},{"style":80},[1854],{"type":45,"value":184},{"type":39,"tag":67,"props":1856,"children":1857},{"style":80},[1858],{"type":45,"value":433},{"type":39,"tag":67,"props":1860,"children":1861},{"class":69,"line":222},[1862,1867,1871,1875,1880,1884,1888,1893,1897,1902,1906],{"type":39,"tag":67,"props":1863,"children":1864},{"style":176},[1865],{"type":45,"value":1866},"    expiresIn",{"type":39,"tag":67,"props":1868,"children":1869},{"style":80},[1870],{"type":45,"value":184},{"type":39,"tag":67,"props":1872,"children":1873},{"style":476},[1874],{"type":45,"value":940},{"type":39,"tag":67,"props":1876,"children":1877},{"style":80},[1878],{"type":45,"value":1879}," *",{"type":39,"tag":67,"props":1881,"children":1882},{"style":476},[1883],{"type":45,"value":940},{"type":39,"tag":67,"props":1885,"children":1886},{"style":80},[1887],{"type":45,"value":1879},{"type":39,"tag":67,"props":1889,"children":1890},{"style":476},[1891],{"type":45,"value":1892}," 24",{"type":39,"tag":67,"props":1894,"children":1895},{"style":80},[1896],{"type":45,"value":1879},{"type":39,"tag":67,"props":1898,"children":1899},{"style":476},[1900],{"type":45,"value":1901}," 7",{"type":39,"tag":67,"props":1903,"children":1904},{"style":80},[1905],{"type":45,"value":213},{"type":39,"tag":67,"props":1907,"children":1908},{"style":216},[1909],{"type":45,"value":1910}," \u002F\u002F 7 days (default)\n",{"type":39,"tag":67,"props":1912,"children":1913},{"class":69,"line":463},[1914,1919,1923,1927,1931,1935,1939,1943,1947],{"type":39,"tag":67,"props":1915,"children":1916},{"style":176},[1917],{"type":45,"value":1918},"    updateAge",{"type":39,"tag":67,"props":1920,"children":1921},{"style":80},[1922],{"type":45,"value":184},{"type":39,"tag":67,"props":1924,"children":1925},{"style":476},[1926],{"type":45,"value":940},{"type":39,"tag":67,"props":1928,"children":1929},{"style":80},[1930],{"type":45,"value":1879},{"type":39,"tag":67,"props":1932,"children":1933},{"style":476},[1934],{"type":45,"value":940},{"type":39,"tag":67,"props":1936,"children":1937},{"style":80},[1938],{"type":45,"value":1879},{"type":39,"tag":67,"props":1940,"children":1941},{"style":476},[1942],{"type":45,"value":1892},{"type":39,"tag":67,"props":1944,"children":1945},{"style":80},[1946],{"type":45,"value":213},{"type":39,"tag":67,"props":1948,"children":1949},{"style":216},[1950],{"type":45,"value":1951}," \u002F\u002F Refresh session every 24 hours (default)\n",{"type":39,"tag":67,"props":1953,"children":1954},{"class":69,"line":491},[1955],{"type":39,"tag":67,"props":1956,"children":1957},{"style":80},[1958],{"type":45,"value":524},{"type":39,"tag":67,"props":1960,"children":1961},{"class":69,"line":518},[1962,1966,1970],{"type":39,"tag":67,"props":1963,"children":1964},{"style":80},[1965],{"type":45,"value":228},{"type":39,"tag":67,"props":1967,"children":1968},{"style":86},[1969],{"type":45,"value":233},{"type":39,"tag":67,"props":1971,"children":1972},{"style":80},[1973],{"type":45,"value":119},{"type":39,"tag":48,"props":1975,"children":1977},{"id":1976},"session-caching-strategies",[1978],{"type":45,"value":1979},"Session Caching Strategies",{"type":39,"tag":239,"props":1981,"children":1982},{},[1983],{"type":45,"value":1984},"Cache session data in cookies to reduce database queries:",{"type":39,"tag":55,"props":1986,"children":1988},{"className":57,"code":1987,"language":59,"meta":60,"style":60},"session: {\n  cookieCache: {\n    enabled: true,\n    maxAge: 60 * 5, \u002F\u002F 5 minutes\n    strategy: \"compact\", \u002F\u002F Options: \"compact\", \"jwt\", \"jwe\"\n  },\n}\n",[1989],{"type":39,"tag":63,"props":1990,"children":1991},{"__ignoreMap":60},[1992,2008,2024,2043,2076,2110,2117],{"type":39,"tag":67,"props":1993,"children":1994},{"class":69,"line":70},[1995,2000,2004],{"type":39,"tag":67,"props":1996,"children":1997},{"style":588},[1998],{"type":45,"value":1999},"session",{"type":39,"tag":67,"props":2001,"children":2002},{"style":80},[2003],{"type":45,"value":184},{"type":39,"tag":67,"props":2005,"children":2006},{"style":80},[2007],{"type":45,"value":433},{"type":39,"tag":67,"props":2009,"children":2010},{"class":69,"line":122},[2011,2016,2020],{"type":39,"tag":67,"props":2012,"children":2013},{"style":588},[2014],{"type":45,"value":2015},"  cookieCache",{"type":39,"tag":67,"props":2017,"children":2018},{"style":80},[2019],{"type":45,"value":184},{"type":39,"tag":67,"props":2021,"children":2022},{"style":80},[2023],{"type":45,"value":433},{"type":39,"tag":67,"props":2025,"children":2026},{"class":69,"line":132},[2027,2031,2035,2039],{"type":39,"tag":67,"props":2028,"children":2029},{"style":588},[2030],{"type":45,"value":441},{"type":39,"tag":67,"props":2032,"children":2033},{"style":80},[2034],{"type":45,"value":184},{"type":39,"tag":67,"props":2036,"children":2037},{"style":448},[2038],{"type":45,"value":451},{"type":39,"tag":67,"props":2040,"children":2041},{"style":80},[2042],{"type":45,"value":629},{"type":39,"tag":67,"props":2044,"children":2045},{"class":69,"line":172},[2046,2051,2055,2059,2063,2067,2071],{"type":39,"tag":67,"props":2047,"children":2048},{"style":588},[2049],{"type":45,"value":2050},"    maxAge",{"type":39,"tag":67,"props":2052,"children":2053},{"style":80},[2054],{"type":45,"value":184},{"type":39,"tag":67,"props":2056,"children":2057},{"style":476},[2058],{"type":45,"value":940},{"type":39,"tag":67,"props":2060,"children":2061},{"style":80},[2062],{"type":45,"value":1879},{"type":39,"tag":67,"props":2064,"children":2065},{"style":476},[2066],{"type":45,"value":966},{"type":39,"tag":67,"props":2068,"children":2069},{"style":80},[2070],{"type":45,"value":213},{"type":39,"tag":67,"props":2072,"children":2073},{"style":216},[2074],{"type":45,"value":2075}," \u002F\u002F 5 minutes\n",{"type":39,"tag":67,"props":2077,"children":2078},{"class":69,"line":222},[2079,2084,2088,2092,2097,2101,2105],{"type":39,"tag":67,"props":2080,"children":2081},{"style":588},[2082],{"type":45,"value":2083},"    strategy",{"type":39,"tag":67,"props":2085,"children":2086},{"style":80},[2087],{"type":45,"value":184},{"type":39,"tag":67,"props":2089,"children":2090},{"style":80},[2091],{"type":45,"value":104},{"type":39,"tag":67,"props":2093,"children":2094},{"style":107},[2095],{"type":45,"value":2096},"compact",{"type":39,"tag":67,"props":2098,"children":2099},{"style":80},[2100],{"type":45,"value":114},{"type":39,"tag":67,"props":2102,"children":2103},{"style":80},[2104],{"type":45,"value":213},{"type":39,"tag":67,"props":2106,"children":2107},{"style":216},[2108],{"type":45,"value":2109}," \u002F\u002F Options: \"compact\", \"jwt\", \"jwe\"\n",{"type":39,"tag":67,"props":2111,"children":2112},{"class":69,"line":463},[2113],{"type":39,"tag":67,"props":2114,"children":2115},{"style":80},[2116],{"type":45,"value":524},{"type":39,"tag":67,"props":2118,"children":2119},{"class":69,"line":491},[2120],{"type":39,"tag":67,"props":2121,"children":2122},{"style":80},[2123],{"type":45,"value":637},{"type":39,"tag":239,"props":2125,"children":2126},{},[2127,2129,2135,2137,2143,2145,2151],{"type":45,"value":2128},"Strategies: ",{"type":39,"tag":63,"props":2130,"children":2132},{"className":2131},[],[2133],{"type":45,"value":2134},"\"compact\"",{"type":45,"value":2136}," (Base64url + HMAC, smallest), ",{"type":39,"tag":63,"props":2138,"children":2140},{"className":2139},[],[2141],{"type":45,"value":2142},"\"jwt\"",{"type":45,"value":2144}," (HS256, standard), ",{"type":39,"tag":63,"props":2146,"children":2148},{"className":2147},[],[2149],{"type":45,"value":2150},"\"jwe\"",{"type":45,"value":2152}," (encrypted, use when session has sensitive data).",{"type":39,"tag":40,"props":2154,"children":2156},{"id":2155},"cookie-security",[2157],{"type":45,"value":2158},"Cookie Security",{"type":39,"tag":239,"props":2160,"children":2161},{},[2162,2164,2170,2172,2178,2179,2185,2186,2192,2194,2200],{"type":45,"value":2163},"Defaults: ",{"type":39,"tag":63,"props":2165,"children":2167},{"className":2166},[],[2168],{"type":45,"value":2169},"secure: true",{"type":45,"value":2171}," (HTTPS\u002Fproduction), ",{"type":39,"tag":63,"props":2173,"children":2175},{"className":2174},[],[2176],{"type":45,"value":2177},"sameSite: \"lax\"",{"type":45,"value":837},{"type":39,"tag":63,"props":2180,"children":2182},{"className":2181},[],[2183],{"type":45,"value":2184},"httpOnly: true",{"type":45,"value":837},{"type":39,"tag":63,"props":2187,"children":2189},{"className":2188},[],[2190],{"type":45,"value":2191},"path: \"\u002F\"",{"type":45,"value":2193},", prefix ",{"type":39,"tag":63,"props":2195,"children":2197},{"className":2196},[],[2198],{"type":45,"value":2199},"__Secure-",{"type":45,"value":194},{"type":39,"tag":48,"props":2202,"children":2204},{"id":2203},"custom-cookie-configuration",[2205],{"type":45,"value":2206},"Custom Cookie Configuration",{"type":39,"tag":55,"props":2208,"children":2210},{"className":57,"code":2209,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    useSecureCookies: true, \u002F\u002F Force secure cookies\n    cookiePrefix: \"myapp\", \u002F\u002F Custom prefix (default: \"better-auth\")\n    defaultCookieAttributes: {\n      sameSite: \"strict\", \u002F\u002F Stricter CSRF protection\n      path: \"\u002Fauth\", \u002F\u002F Limit cookie scope\n    },\n  },\n});\n",[2211],{"type":39,"tag":63,"props":2212,"children":2213},{"__ignoreMap":60},[2214,2253,2260,2291,2306,2331,2365,2381,2415,2449,2456,2464],{"type":39,"tag":67,"props":2215,"children":2216},{"class":69,"line":70},[2217,2221,2225,2229,2233,2237,2241,2245,2249],{"type":39,"tag":67,"props":2218,"children":2219},{"style":74},[2220],{"type":45,"value":77},{"type":39,"tag":67,"props":2222,"children":2223},{"style":80},[2224],{"type":45,"value":83},{"type":39,"tag":67,"props":2226,"children":2227},{"style":86},[2228],{"type":45,"value":89},{"type":39,"tag":67,"props":2230,"children":2231},{"style":80},[2232],{"type":45,"value":94},{"type":39,"tag":67,"props":2234,"children":2235},{"style":74},[2236],{"type":45,"value":99},{"type":39,"tag":67,"props":2238,"children":2239},{"style":80},[2240],{"type":45,"value":104},{"type":39,"tag":67,"props":2242,"children":2243},{"style":107},[2244],{"type":45,"value":8},{"type":39,"tag":67,"props":2246,"children":2247},{"style":80},[2248],{"type":45,"value":114},{"type":39,"tag":67,"props":2250,"children":2251},{"style":80},[2252],{"type":45,"value":119},{"type":39,"tag":67,"props":2254,"children":2255},{"class":69,"line":122},[2256],{"type":39,"tag":67,"props":2257,"children":2258},{"emptyLinePlaceholder":126},[2259],{"type":45,"value":129},{"type":39,"tag":67,"props":2261,"children":2262},{"class":69,"line":132},[2263,2267,2271,2275,2279,2283,2287],{"type":39,"tag":67,"props":2264,"children":2265},{"style":74},[2266],{"type":45,"value":138},{"type":39,"tag":67,"props":2268,"children":2269},{"style":141},[2270],{"type":45,"value":144},{"type":39,"tag":67,"props":2272,"children":2273},{"style":86},[2274],{"type":45,"value":149},{"type":39,"tag":67,"props":2276,"children":2277},{"style":80},[2278],{"type":45,"value":154},{"type":39,"tag":67,"props":2280,"children":2281},{"style":157},[2282],{"type":45,"value":89},{"type":39,"tag":67,"props":2284,"children":2285},{"style":86},[2286],{"type":45,"value":164},{"type":39,"tag":67,"props":2288,"children":2289},{"style":80},[2290],{"type":45,"value":169},{"type":39,"tag":67,"props":2292,"children":2293},{"class":69,"line":172},[2294,2298,2302],{"type":39,"tag":67,"props":2295,"children":2296},{"style":176},[2297],{"type":45,"value":1139},{"type":39,"tag":67,"props":2299,"children":2300},{"style":80},[2301],{"type":45,"value":184},{"type":39,"tag":67,"props":2303,"children":2304},{"style":80},[2305],{"type":45,"value":433},{"type":39,"tag":67,"props":2307,"children":2308},{"class":69,"line":222},[2309,2314,2318,2322,2326],{"type":39,"tag":67,"props":2310,"children":2311},{"style":176},[2312],{"type":45,"value":2313},"    useSecureCookies",{"type":39,"tag":67,"props":2315,"children":2316},{"style":80},[2317],{"type":45,"value":184},{"type":39,"tag":67,"props":2319,"children":2320},{"style":448},[2321],{"type":45,"value":451},{"type":39,"tag":67,"props":2323,"children":2324},{"style":80},[2325],{"type":45,"value":213},{"type":39,"tag":67,"props":2327,"children":2328},{"style":216},[2329],{"type":45,"value":2330}," \u002F\u002F Force secure cookies\n",{"type":39,"tag":67,"props":2332,"children":2333},{"class":69,"line":463},[2334,2339,2343,2347,2352,2356,2360],{"type":39,"tag":67,"props":2335,"children":2336},{"style":176},[2337],{"type":45,"value":2338},"    cookiePrefix",{"type":39,"tag":67,"props":2340,"children":2341},{"style":80},[2342],{"type":45,"value":184},{"type":39,"tag":67,"props":2344,"children":2345},{"style":80},[2346],{"type":45,"value":104},{"type":39,"tag":67,"props":2348,"children":2349},{"style":107},[2350],{"type":45,"value":2351},"myapp",{"type":39,"tag":67,"props":2353,"children":2354},{"style":80},[2355],{"type":45,"value":114},{"type":39,"tag":67,"props":2357,"children":2358},{"style":80},[2359],{"type":45,"value":213},{"type":39,"tag":67,"props":2361,"children":2362},{"style":216},[2363],{"type":45,"value":2364}," \u002F\u002F Custom prefix (default: \"better-auth\")\n",{"type":39,"tag":67,"props":2366,"children":2367},{"class":69,"line":491},[2368,2373,2377],{"type":39,"tag":67,"props":2369,"children":2370},{"style":176},[2371],{"type":45,"value":2372},"    defaultCookieAttributes",{"type":39,"tag":67,"props":2374,"children":2375},{"style":80},[2376],{"type":45,"value":184},{"type":39,"tag":67,"props":2378,"children":2379},{"style":80},[2380],{"type":45,"value":433},{"type":39,"tag":67,"props":2382,"children":2383},{"class":69,"line":518},[2384,2389,2393,2397,2402,2406,2410],{"type":39,"tag":67,"props":2385,"children":2386},{"style":176},[2387],{"type":45,"value":2388},"      sameSite",{"type":39,"tag":67,"props":2390,"children":2391},{"style":80},[2392],{"type":45,"value":184},{"type":39,"tag":67,"props":2394,"children":2395},{"style":80},[2396],{"type":45,"value":104},{"type":39,"tag":67,"props":2398,"children":2399},{"style":107},[2400],{"type":45,"value":2401},"strict",{"type":39,"tag":67,"props":2403,"children":2404},{"style":80},[2405],{"type":45,"value":114},{"type":39,"tag":67,"props":2407,"children":2408},{"style":80},[2409],{"type":45,"value":213},{"type":39,"tag":67,"props":2411,"children":2412},{"style":216},[2413],{"type":45,"value":2414}," \u002F\u002F Stricter CSRF protection\n",{"type":39,"tag":67,"props":2416,"children":2417},{"class":69,"line":527},[2418,2423,2427,2431,2436,2440,2444],{"type":39,"tag":67,"props":2419,"children":2420},{"style":176},[2421],{"type":45,"value":2422},"      path",{"type":39,"tag":67,"props":2424,"children":2425},{"style":80},[2426],{"type":45,"value":184},{"type":39,"tag":67,"props":2428,"children":2429},{"style":80},[2430],{"type":45,"value":104},{"type":39,"tag":67,"props":2432,"children":2433},{"style":107},[2434],{"type":45,"value":2435},"\u002Fauth",{"type":39,"tag":67,"props":2437,"children":2438},{"style":80},[2439],{"type":45,"value":114},{"type":39,"tag":67,"props":2441,"children":2442},{"style":80},[2443],{"type":45,"value":213},{"type":39,"tag":67,"props":2445,"children":2446},{"style":216},[2447],{"type":45,"value":2448}," \u002F\u002F Limit cookie scope\n",{"type":39,"tag":67,"props":2450,"children":2451},{"class":69,"line":813},[2452],{"type":39,"tag":67,"props":2453,"children":2454},{"style":80},[2455],{"type":45,"value":743},{"type":39,"tag":67,"props":2457,"children":2459},{"class":69,"line":2458},11,[2460],{"type":39,"tag":67,"props":2461,"children":2462},{"style":80},[2463],{"type":45,"value":524},{"type":39,"tag":67,"props":2465,"children":2467},{"class":69,"line":2466},12,[2468,2472,2476],{"type":39,"tag":67,"props":2469,"children":2470},{"style":80},[2471],{"type":45,"value":228},{"type":39,"tag":67,"props":2473,"children":2474},{"style":86},[2475],{"type":45,"value":233},{"type":39,"tag":67,"props":2477,"children":2478},{"style":80},[2479],{"type":45,"value":119},{"type":39,"tag":48,"props":2481,"children":2483},{"id":2482},"cross-subdomain-cookies",[2484],{"type":45,"value":2485},"Cross-Subdomain Cookies",{"type":39,"tag":55,"props":2487,"children":2489},{"className":57,"code":2488,"language":59,"meta":60,"style":60},"advanced: {\n  crossSubDomainCookies: {\n    enabled: true,\n    domain: \".example.com\", \u002F\u002F Note the leading dot\n    additionalCookies: [\"session_token\", \"session_data\"],\n  },\n}\n",[2490],{"type":39,"tag":63,"props":2491,"children":2492},{"__ignoreMap":60},[2493,2509,2525,2544,2578,2632,2639],{"type":39,"tag":67,"props":2494,"children":2495},{"class":69,"line":70},[2496,2501,2505],{"type":39,"tag":67,"props":2497,"children":2498},{"style":588},[2499],{"type":45,"value":2500},"advanced",{"type":39,"tag":67,"props":2502,"children":2503},{"style":80},[2504],{"type":45,"value":184},{"type":39,"tag":67,"props":2506,"children":2507},{"style":80},[2508],{"type":45,"value":433},{"type":39,"tag":67,"props":2510,"children":2511},{"class":69,"line":122},[2512,2517,2521],{"type":39,"tag":67,"props":2513,"children":2514},{"style":588},[2515],{"type":45,"value":2516},"  crossSubDomainCookies",{"type":39,"tag":67,"props":2518,"children":2519},{"style":80},[2520],{"type":45,"value":184},{"type":39,"tag":67,"props":2522,"children":2523},{"style":80},[2524],{"type":45,"value":433},{"type":39,"tag":67,"props":2526,"children":2527},{"class":69,"line":132},[2528,2532,2536,2540],{"type":39,"tag":67,"props":2529,"children":2530},{"style":588},[2531],{"type":45,"value":441},{"type":39,"tag":67,"props":2533,"children":2534},{"style":80},[2535],{"type":45,"value":184},{"type":39,"tag":67,"props":2537,"children":2538},{"style":448},[2539],{"type":45,"value":451},{"type":39,"tag":67,"props":2541,"children":2542},{"style":80},[2543],{"type":45,"value":629},{"type":39,"tag":67,"props":2545,"children":2546},{"class":69,"line":172},[2547,2552,2556,2560,2565,2569,2573],{"type":39,"tag":67,"props":2548,"children":2549},{"style":588},[2550],{"type":45,"value":2551},"    domain",{"type":39,"tag":67,"props":2553,"children":2554},{"style":80},[2555],{"type":45,"value":184},{"type":39,"tag":67,"props":2557,"children":2558},{"style":80},[2559],{"type":45,"value":104},{"type":39,"tag":67,"props":2561,"children":2562},{"style":107},[2563],{"type":45,"value":2564},".example.com",{"type":39,"tag":67,"props":2566,"children":2567},{"style":80},[2568],{"type":45,"value":114},{"type":39,"tag":67,"props":2570,"children":2571},{"style":80},[2572],{"type":45,"value":213},{"type":39,"tag":67,"props":2574,"children":2575},{"style":216},[2576],{"type":45,"value":2577}," \u002F\u002F Note the leading dot\n",{"type":39,"tag":67,"props":2579,"children":2580},{"class":69,"line":222},[2581,2586,2590,2594,2598,2603,2607,2611,2615,2620,2624,2628],{"type":39,"tag":67,"props":2582,"children":2583},{"style":588},[2584],{"type":45,"value":2585},"    additionalCookies",{"type":39,"tag":67,"props":2587,"children":2588},{"style":80},[2589],{"type":45,"value":184},{"type":39,"tag":67,"props":2591,"children":2592},{"style":176},[2593],{"type":45,"value":1655},{"type":39,"tag":67,"props":2595,"children":2596},{"style":80},[2597],{"type":45,"value":114},{"type":39,"tag":67,"props":2599,"children":2600},{"style":107},[2601],{"type":45,"value":2602},"session_token",{"type":39,"tag":67,"props":2604,"children":2605},{"style":80},[2606],{"type":45,"value":114},{"type":39,"tag":67,"props":2608,"children":2609},{"style":80},[2610],{"type":45,"value":213},{"type":39,"tag":67,"props":2612,"children":2613},{"style":80},[2614],{"type":45,"value":104},{"type":39,"tag":67,"props":2616,"children":2617},{"style":107},[2618],{"type":45,"value":2619},"session_data",{"type":39,"tag":67,"props":2621,"children":2622},{"style":80},[2623],{"type":45,"value":114},{"type":39,"tag":67,"props":2625,"children":2626},{"style":176},[2627],{"type":45,"value":1693},{"type":39,"tag":67,"props":2629,"children":2630},{"style":80},[2631],{"type":45,"value":629},{"type":39,"tag":67,"props":2633,"children":2634},{"class":69,"line":463},[2635],{"type":39,"tag":67,"props":2636,"children":2637},{"style":80},[2638],{"type":45,"value":524},{"type":39,"tag":67,"props":2640,"children":2641},{"class":69,"line":491},[2642],{"type":39,"tag":67,"props":2643,"children":2644},{"style":80},[2645],{"type":45,"value":637},{"type":39,"tag":239,"props":2647,"children":2648},{},[2649],{"type":45,"value":2650},"Only enable if you need authentication sharing and trust all subdomains.",{"type":39,"tag":40,"props":2652,"children":2654},{"id":2653},"oauth-social-provider-security",[2655],{"type":45,"value":2656},"OAuth \u002F Social Provider Security",{"type":39,"tag":239,"props":2658,"children":2659},{},[2660],{"type":45,"value":2661},"PKCE is automatic for all OAuth flows. State tokens are 32-char random strings expiring after 10 minutes.",{"type":39,"tag":48,"props":2663,"children":2665},{"id":2664},"state-parameter-storage",[2666],{"type":45,"value":2667},"State Parameter Storage",{"type":39,"tag":55,"props":2669,"children":2671},{"className":57,"code":2670,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  account: {\n    storeStateStrategy: \"cookie\", \u002F\u002F Options: \"cookie\" (default), \"database\"\n  },\n});\n",[2672],{"type":39,"tag":63,"props":2673,"children":2674},{"__ignoreMap":60},[2675,2714,2721,2752,2768,2802,2809],{"type":39,"tag":67,"props":2676,"children":2677},{"class":69,"line":70},[2678,2682,2686,2690,2694,2698,2702,2706,2710],{"type":39,"tag":67,"props":2679,"children":2680},{"style":74},[2681],{"type":45,"value":77},{"type":39,"tag":67,"props":2683,"children":2684},{"style":80},[2685],{"type":45,"value":83},{"type":39,"tag":67,"props":2687,"children":2688},{"style":86},[2689],{"type":45,"value":89},{"type":39,"tag":67,"props":2691,"children":2692},{"style":80},[2693],{"type":45,"value":94},{"type":39,"tag":67,"props":2695,"children":2696},{"style":74},[2697],{"type":45,"value":99},{"type":39,"tag":67,"props":2699,"children":2700},{"style":80},[2701],{"type":45,"value":104},{"type":39,"tag":67,"props":2703,"children":2704},{"style":107},[2705],{"type":45,"value":8},{"type":39,"tag":67,"props":2707,"children":2708},{"style":80},[2709],{"type":45,"value":114},{"type":39,"tag":67,"props":2711,"children":2712},{"style":80},[2713],{"type":45,"value":119},{"type":39,"tag":67,"props":2715,"children":2716},{"class":69,"line":122},[2717],{"type":39,"tag":67,"props":2718,"children":2719},{"emptyLinePlaceholder":126},[2720],{"type":45,"value":129},{"type":39,"tag":67,"props":2722,"children":2723},{"class":69,"line":132},[2724,2728,2732,2736,2740,2744,2748],{"type":39,"tag":67,"props":2725,"children":2726},{"style":74},[2727],{"type":45,"value":138},{"type":39,"tag":67,"props":2729,"children":2730},{"style":141},[2731],{"type":45,"value":144},{"type":39,"tag":67,"props":2733,"children":2734},{"style":86},[2735],{"type":45,"value":149},{"type":39,"tag":67,"props":2737,"children":2738},{"style":80},[2739],{"type":45,"value":154},{"type":39,"tag":67,"props":2741,"children":2742},{"style":157},[2743],{"type":45,"value":89},{"type":39,"tag":67,"props":2745,"children":2746},{"style":86},[2747],{"type":45,"value":164},{"type":39,"tag":67,"props":2749,"children":2750},{"style":80},[2751],{"type":45,"value":169},{"type":39,"tag":67,"props":2753,"children":2754},{"class":69,"line":172},[2755,2760,2764],{"type":39,"tag":67,"props":2756,"children":2757},{"style":176},[2758],{"type":45,"value":2759},"  account",{"type":39,"tag":67,"props":2761,"children":2762},{"style":80},[2763],{"type":45,"value":184},{"type":39,"tag":67,"props":2765,"children":2766},{"style":80},[2767],{"type":45,"value":433},{"type":39,"tag":67,"props":2769,"children":2770},{"class":69,"line":222},[2771,2776,2780,2784,2789,2793,2797],{"type":39,"tag":67,"props":2772,"children":2773},{"style":176},[2774],{"type":45,"value":2775},"    storeStateStrategy",{"type":39,"tag":67,"props":2777,"children":2778},{"style":80},[2779],{"type":45,"value":184},{"type":39,"tag":67,"props":2781,"children":2782},{"style":80},[2783],{"type":45,"value":104},{"type":39,"tag":67,"props":2785,"children":2786},{"style":107},[2787],{"type":45,"value":2788},"cookie",{"type":39,"tag":67,"props":2790,"children":2791},{"style":80},[2792],{"type":45,"value":114},{"type":39,"tag":67,"props":2794,"children":2795},{"style":80},[2796],{"type":45,"value":213},{"type":39,"tag":67,"props":2798,"children":2799},{"style":216},[2800],{"type":45,"value":2801}," \u002F\u002F Options: \"cookie\" (default), \"database\"\n",{"type":39,"tag":67,"props":2803,"children":2804},{"class":69,"line":463},[2805],{"type":39,"tag":67,"props":2806,"children":2807},{"style":80},[2808],{"type":45,"value":524},{"type":39,"tag":67,"props":2810,"children":2811},{"class":69,"line":491},[2812,2816,2820],{"type":39,"tag":67,"props":2813,"children":2814},{"style":80},[2815],{"type":45,"value":228},{"type":39,"tag":67,"props":2817,"children":2818},{"style":86},[2819],{"type":45,"value":233},{"type":39,"tag":67,"props":2821,"children":2822},{"style":80},[2823],{"type":45,"value":119},{"type":39,"tag":48,"props":2825,"children":2827},{"id":2826},"encrypting-oauth-tokens",[2828],{"type":45,"value":2829},"Encrypting OAuth Tokens",{"type":39,"tag":55,"props":2831,"children":2833},{"className":57,"code":2832,"language":59,"meta":60,"style":60},"account: {\n  encryptOAuthTokens: true, \u002F\u002F Uses AES-256-GCM\n}\n",[2834],{"type":39,"tag":63,"props":2835,"children":2836},{"__ignoreMap":60},[2837,2853,2878],{"type":39,"tag":67,"props":2838,"children":2839},{"class":69,"line":70},[2840,2845,2849],{"type":39,"tag":67,"props":2841,"children":2842},{"style":588},[2843],{"type":45,"value":2844},"account",{"type":39,"tag":67,"props":2846,"children":2847},{"style":80},[2848],{"type":45,"value":184},{"type":39,"tag":67,"props":2850,"children":2851},{"style":80},[2852],{"type":45,"value":433},{"type":39,"tag":67,"props":2854,"children":2855},{"class":69,"line":122},[2856,2861,2865,2869,2873],{"type":39,"tag":67,"props":2857,"children":2858},{"style":588},[2859],{"type":45,"value":2860},"  encryptOAuthTokens",{"type":39,"tag":67,"props":2862,"children":2863},{"style":80},[2864],{"type":45,"value":184},{"type":39,"tag":67,"props":2866,"children":2867},{"style":448},[2868],{"type":45,"value":451},{"type":39,"tag":67,"props":2870,"children":2871},{"style":80},[2872],{"type":45,"value":213},{"type":39,"tag":67,"props":2874,"children":2875},{"style":216},[2876],{"type":45,"value":2877}," \u002F\u002F Uses AES-256-GCM\n",{"type":39,"tag":67,"props":2879,"children":2880},{"class":69,"line":132},[2881],{"type":39,"tag":67,"props":2882,"children":2883},{"style":80},[2884],{"type":45,"value":637},{"type":39,"tag":239,"props":2886,"children":2887},{},[2888,2890,2896],{"type":45,"value":2889},"Enable if storing OAuth tokens for API access on behalf of users. Use ",{"type":39,"tag":63,"props":2891,"children":2893},{"className":2892},[],[2894],{"type":45,"value":2895},"skipStateCookieCheck: true",{"type":45,"value":2897}," only for mobile apps that cannot maintain cookies.",{"type":39,"tag":40,"props":2899,"children":2901},{"id":2900},"ip-based-security",[2902],{"type":45,"value":2903},"IP-Based Security",{"type":39,"tag":48,"props":2905,"children":2907},{"id":2906},"ip-address-configuration",[2908],{"type":45,"value":2909},"IP Address Configuration",{"type":39,"tag":55,"props":2911,"children":2913},{"className":57,"code":2912,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    ipAddress: {\n      ipAddressHeaders: [\"x-forwarded-for\", \"x-real-ip\"], \u002F\u002F Headers to check\n      disableIpTracking: false, \u002F\u002F Keep enabled for rate limiting\n    },\n  },\n});\n",[2914],{"type":39,"tag":63,"props":2915,"children":2916},{"__ignoreMap":60},[2917,2956,2963,2994,3009,3025,3084,3109,3116,3123],{"type":39,"tag":67,"props":2918,"children":2919},{"class":69,"line":70},[2920,2924,2928,2932,2936,2940,2944,2948,2952],{"type":39,"tag":67,"props":2921,"children":2922},{"style":74},[2923],{"type":45,"value":77},{"type":39,"tag":67,"props":2925,"children":2926},{"style":80},[2927],{"type":45,"value":83},{"type":39,"tag":67,"props":2929,"children":2930},{"style":86},[2931],{"type":45,"value":89},{"type":39,"tag":67,"props":2933,"children":2934},{"style":80},[2935],{"type":45,"value":94},{"type":39,"tag":67,"props":2937,"children":2938},{"style":74},[2939],{"type":45,"value":99},{"type":39,"tag":67,"props":2941,"children":2942},{"style":80},[2943],{"type":45,"value":104},{"type":39,"tag":67,"props":2945,"children":2946},{"style":107},[2947],{"type":45,"value":8},{"type":39,"tag":67,"props":2949,"children":2950},{"style":80},[2951],{"type":45,"value":114},{"type":39,"tag":67,"props":2953,"children":2954},{"style":80},[2955],{"type":45,"value":119},{"type":39,"tag":67,"props":2957,"children":2958},{"class":69,"line":122},[2959],{"type":39,"tag":67,"props":2960,"children":2961},{"emptyLinePlaceholder":126},[2962],{"type":45,"value":129},{"type":39,"tag":67,"props":2964,"children":2965},{"class":69,"line":132},[2966,2970,2974,2978,2982,2986,2990],{"type":39,"tag":67,"props":2967,"children":2968},{"style":74},[2969],{"type":45,"value":138},{"type":39,"tag":67,"props":2971,"children":2972},{"style":141},[2973],{"type":45,"value":144},{"type":39,"tag":67,"props":2975,"children":2976},{"style":86},[2977],{"type":45,"value":149},{"type":39,"tag":67,"props":2979,"children":2980},{"style":80},[2981],{"type":45,"value":154},{"type":39,"tag":67,"props":2983,"children":2984},{"style":157},[2985],{"type":45,"value":89},{"type":39,"tag":67,"props":2987,"children":2988},{"style":86},[2989],{"type":45,"value":164},{"type":39,"tag":67,"props":2991,"children":2992},{"style":80},[2993],{"type":45,"value":169},{"type":39,"tag":67,"props":2995,"children":2996},{"class":69,"line":172},[2997,3001,3005],{"type":39,"tag":67,"props":2998,"children":2999},{"style":176},[3000],{"type":45,"value":1139},{"type":39,"tag":67,"props":3002,"children":3003},{"style":80},[3004],{"type":45,"value":184},{"type":39,"tag":67,"props":3006,"children":3007},{"style":80},[3008],{"type":45,"value":433},{"type":39,"tag":67,"props":3010,"children":3011},{"class":69,"line":222},[3012,3017,3021],{"type":39,"tag":67,"props":3013,"children":3014},{"style":176},[3015],{"type":45,"value":3016},"    ipAddress",{"type":39,"tag":67,"props":3018,"children":3019},{"style":80},[3020],{"type":45,"value":184},{"type":39,"tag":67,"props":3022,"children":3023},{"style":80},[3024],{"type":45,"value":433},{"type":39,"tag":67,"props":3026,"children":3027},{"class":69,"line":463},[3028,3033,3037,3041,3045,3050,3054,3058,3062,3067,3071,3075,3079],{"type":39,"tag":67,"props":3029,"children":3030},{"style":176},[3031],{"type":45,"value":3032},"      ipAddressHeaders",{"type":39,"tag":67,"props":3034,"children":3035},{"style":80},[3036],{"type":45,"value":184},{"type":39,"tag":67,"props":3038,"children":3039},{"style":86},[3040],{"type":45,"value":1655},{"type":39,"tag":67,"props":3042,"children":3043},{"style":80},[3044],{"type":45,"value":114},{"type":39,"tag":67,"props":3046,"children":3047},{"style":107},[3048],{"type":45,"value":3049},"x-forwarded-for",{"type":39,"tag":67,"props":3051,"children":3052},{"style":80},[3053],{"type":45,"value":114},{"type":39,"tag":67,"props":3055,"children":3056},{"style":80},[3057],{"type":45,"value":213},{"type":39,"tag":67,"props":3059,"children":3060},{"style":80},[3061],{"type":45,"value":104},{"type":39,"tag":67,"props":3063,"children":3064},{"style":107},[3065],{"type":45,"value":3066},"x-real-ip",{"type":39,"tag":67,"props":3068,"children":3069},{"style":80},[3070],{"type":45,"value":114},{"type":39,"tag":67,"props":3072,"children":3073},{"style":86},[3074],{"type":45,"value":1693},{"type":39,"tag":67,"props":3076,"children":3077},{"style":80},[3078],{"type":45,"value":213},{"type":39,"tag":67,"props":3080,"children":3081},{"style":216},[3082],{"type":45,"value":3083}," \u002F\u002F Headers to check\n",{"type":39,"tag":67,"props":3085,"children":3086},{"class":69,"line":491},[3087,3092,3096,3100,3104],{"type":39,"tag":67,"props":3088,"children":3089},{"style":176},[3090],{"type":45,"value":3091},"      disableIpTracking",{"type":39,"tag":67,"props":3093,"children":3094},{"style":80},[3095],{"type":45,"value":184},{"type":39,"tag":67,"props":3097,"children":3098},{"style":448},[3099],{"type":45,"value":1164},{"type":39,"tag":67,"props":3101,"children":3102},{"style":80},[3103],{"type":45,"value":213},{"type":39,"tag":67,"props":3105,"children":3106},{"style":216},[3107],{"type":45,"value":3108}," \u002F\u002F Keep enabled for rate limiting\n",{"type":39,"tag":67,"props":3110,"children":3111},{"class":69,"line":518},[3112],{"type":39,"tag":67,"props":3113,"children":3114},{"style":80},[3115],{"type":45,"value":743},{"type":39,"tag":67,"props":3117,"children":3118},{"class":69,"line":527},[3119],{"type":39,"tag":67,"props":3120,"children":3121},{"style":80},[3122],{"type":45,"value":524},{"type":39,"tag":67,"props":3124,"children":3125},{"class":69,"line":813},[3126,3130,3134],{"type":39,"tag":67,"props":3127,"children":3128},{"style":80},[3129],{"type":45,"value":228},{"type":39,"tag":67,"props":3131,"children":3132},{"style":86},[3133],{"type":45,"value":233},{"type":39,"tag":67,"props":3135,"children":3136},{"style":80},[3137],{"type":45,"value":119},{"type":39,"tag":239,"props":3139,"children":3140},{},[3141,3143,3149,3151,3157],{"type":45,"value":3142},"Set ",{"type":39,"tag":63,"props":3144,"children":3146},{"className":3145},[],[3147],{"type":45,"value":3148},"ipv6Subnet",{"type":45,"value":3150}," (128, 64, 48, 32; default 64) to group IPv6 addresses. Enable ",{"type":39,"tag":63,"props":3152,"children":3154},{"className":3153},[],[3155],{"type":45,"value":3156},"trustedProxyHeaders: true",{"type":45,"value":3158}," only if behind a trusted reverse proxy.",{"type":39,"tag":40,"props":3160,"children":3162},{"id":3161},"database-hooks-for-security-auditing",[3163],{"type":45,"value":3164},"Database Hooks for Security Auditing",{"type":39,"tag":55,"props":3166,"children":3168},{"className":57,"code":3167,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  databaseHooks: {\n    session: {\n      create: {\n        after: async ({ data, ctx }) => {\n          await auditLog(\"session.created\", {\n            userId: data.userId,\n            ip: ctx?.request?.headers.get(\"x-forwarded-for\"),\n            userAgent: ctx?.request?.headers.get(\"user-agent\"),\n          });\n        },\n      },\n      delete: {\n        before: async ({ data }) => {\n          await auditLog(\"session.revoked\", { sessionId: data.id });\n        },\n      },\n    },\n    user: {\n      update: {\n        after: async ({ data, oldData }) => {\n          if (oldData?.email !== data.email) {\n            await auditLog(\"user.email_changed\", {\n              userId: data.id,\n              oldEmail: oldData?.email,\n              newEmail: data.email,\n            });\n          }\n        },\n      },\n    },\n    account: {\n      create: {\n        after: async ({ data }) => {\n          await auditLog(\"account.linked\", {\n            userId: data.userId,\n            provider: data.providerId,\n          });\n        },\n      },\n    },\n  },\n});\n",[3169],{"type":39,"tag":63,"props":3170,"children":3171},{"__ignoreMap":60},[3172,3211,3218,3249,3265,3281,3297,3344,3382,3411,3478,3543,3559,3568,3577,3594,3631,3702,3710,3718,3726,3743,3760,3805,3858,3896,3925,3954,3982,3999,4008,4016,4024,4032,4049,4065,4101,4138,4166,4196,4212,4220,4228,4236,4244],{"type":39,"tag":67,"props":3173,"children":3174},{"class":69,"line":70},[3175,3179,3183,3187,3191,3195,3199,3203,3207],{"type":39,"tag":67,"props":3176,"children":3177},{"style":74},[3178],{"type":45,"value":77},{"type":39,"tag":67,"props":3180,"children":3181},{"style":80},[3182],{"type":45,"value":83},{"type":39,"tag":67,"props":3184,"children":3185},{"style":86},[3186],{"type":45,"value":89},{"type":39,"tag":67,"props":3188,"children":3189},{"style":80},[3190],{"type":45,"value":94},{"type":39,"tag":67,"props":3192,"children":3193},{"style":74},[3194],{"type":45,"value":99},{"type":39,"tag":67,"props":3196,"children":3197},{"style":80},[3198],{"type":45,"value":104},{"type":39,"tag":67,"props":3200,"children":3201},{"style":107},[3202],{"type":45,"value":8},{"type":39,"tag":67,"props":3204,"children":3205},{"style":80},[3206],{"type":45,"value":114},{"type":39,"tag":67,"props":3208,"children":3209},{"style":80},[3210],{"type":45,"value":119},{"type":39,"tag":67,"props":3212,"children":3213},{"class":69,"line":122},[3214],{"type":39,"tag":67,"props":3215,"children":3216},{"emptyLinePlaceholder":126},[3217],{"type":45,"value":129},{"type":39,"tag":67,"props":3219,"children":3220},{"class":69,"line":132},[3221,3225,3229,3233,3237,3241,3245],{"type":39,"tag":67,"props":3222,"children":3223},{"style":74},[3224],{"type":45,"value":138},{"type":39,"tag":67,"props":3226,"children":3227},{"style":141},[3228],{"type":45,"value":144},{"type":39,"tag":67,"props":3230,"children":3231},{"style":86},[3232],{"type":45,"value":149},{"type":39,"tag":67,"props":3234,"children":3235},{"style":80},[3236],{"type":45,"value":154},{"type":39,"tag":67,"props":3238,"children":3239},{"style":157},[3240],{"type":45,"value":89},{"type":39,"tag":67,"props":3242,"children":3243},{"style":86},[3244],{"type":45,"value":164},{"type":39,"tag":67,"props":3246,"children":3247},{"style":80},[3248],{"type":45,"value":169},{"type":39,"tag":67,"props":3250,"children":3251},{"class":69,"line":172},[3252,3257,3261],{"type":39,"tag":67,"props":3253,"children":3254},{"style":176},[3255],{"type":45,"value":3256},"  databaseHooks",{"type":39,"tag":67,"props":3258,"children":3259},{"style":80},[3260],{"type":45,"value":184},{"type":39,"tag":67,"props":3262,"children":3263},{"style":80},[3264],{"type":45,"value":433},{"type":39,"tag":67,"props":3266,"children":3267},{"class":69,"line":222},[3268,3273,3277],{"type":39,"tag":67,"props":3269,"children":3270},{"style":176},[3271],{"type":45,"value":3272},"    session",{"type":39,"tag":67,"props":3274,"children":3275},{"style":80},[3276],{"type":45,"value":184},{"type":39,"tag":67,"props":3278,"children":3279},{"style":80},[3280],{"type":45,"value":433},{"type":39,"tag":67,"props":3282,"children":3283},{"class":69,"line":463},[3284,3289,3293],{"type":39,"tag":67,"props":3285,"children":3286},{"style":176},[3287],{"type":45,"value":3288},"      create",{"type":39,"tag":67,"props":3290,"children":3291},{"style":80},[3292],{"type":45,"value":184},{"type":39,"tag":67,"props":3294,"children":3295},{"style":80},[3296],{"type":45,"value":433},{"type":39,"tag":67,"props":3298,"children":3299},{"class":69,"line":491},[3300,3305,3309,3313,3318,3322,3326,3331,3336,3340],{"type":39,"tag":67,"props":3301,"children":3302},{"style":157},[3303],{"type":45,"value":3304},"        after",{"type":39,"tag":67,"props":3306,"children":3307},{"style":80},[3308],{"type":45,"value":184},{"type":39,"tag":67,"props":3310,"children":3311},{"style":141},[3312],{"type":45,"value":703},{"type":39,"tag":67,"props":3314,"children":3315},{"style":80},[3316],{"type":45,"value":3317}," ({",{"type":39,"tag":67,"props":3319,"children":3320},{"style":711},[3321],{"type":45,"value":776},{"type":39,"tag":67,"props":3323,"children":3324},{"style":80},[3325],{"type":45,"value":213},{"type":39,"tag":67,"props":3327,"children":3328},{"style":711},[3329],{"type":45,"value":3330}," ctx",{"type":39,"tag":67,"props":3332,"children":3333},{"style":80},[3334],{"type":45,"value":3335}," })",{"type":39,"tag":67,"props":3337,"children":3338},{"style":141},[3339],{"type":45,"value":723},{"type":39,"tag":67,"props":3341,"children":3342},{"style":80},[3343],{"type":45,"value":433},{"type":39,"tag":67,"props":3345,"children":3346},{"class":69,"line":518},[3347,3352,3357,3361,3365,3370,3374,3378],{"type":39,"tag":67,"props":3348,"children":3349},{"style":74},[3350],{"type":45,"value":3351},"          await",{"type":39,"tag":67,"props":3353,"children":3354},{"style":157},[3355],{"type":45,"value":3356}," auditLog",{"type":39,"tag":67,"props":3358,"children":3359},{"style":176},[3360],{"type":45,"value":164},{"type":39,"tag":67,"props":3362,"children":3363},{"style":80},[3364],{"type":45,"value":114},{"type":39,"tag":67,"props":3366,"children":3367},{"style":107},[3368],{"type":45,"value":3369},"session.created",{"type":39,"tag":67,"props":3371,"children":3372},{"style":80},[3373],{"type":45,"value":114},{"type":39,"tag":67,"props":3375,"children":3376},{"style":80},[3377],{"type":45,"value":213},{"type":39,"tag":67,"props":3379,"children":3380},{"style":80},[3381],{"type":45,"value":433},{"type":39,"tag":67,"props":3383,"children":3384},{"class":69,"line":527},[3385,3390,3394,3398,3402,3407],{"type":39,"tag":67,"props":3386,"children":3387},{"style":176},[3388],{"type":45,"value":3389},"            userId",{"type":39,"tag":67,"props":3391,"children":3392},{"style":80},[3393],{"type":45,"value":184},{"type":39,"tag":67,"props":3395,"children":3396},{"style":86},[3397],{"type":45,"value":776},{"type":39,"tag":67,"props":3399,"children":3400},{"style":80},[3401],{"type":45,"value":194},{"type":39,"tag":67,"props":3403,"children":3404},{"style":86},[3405],{"type":45,"value":3406},"userId",{"type":39,"tag":67,"props":3408,"children":3409},{"style":80},[3410],{"type":45,"value":629},{"type":39,"tag":67,"props":3412,"children":3413},{"class":69,"line":813},[3414,3419,3423,3427,3432,3436,3440,3445,3449,3454,3458,3462,3466,3470,3474],{"type":39,"tag":67,"props":3415,"children":3416},{"style":176},[3417],{"type":45,"value":3418},"            ip",{"type":39,"tag":67,"props":3420,"children":3421},{"style":80},[3422],{"type":45,"value":184},{"type":39,"tag":67,"props":3424,"children":3425},{"style":86},[3426],{"type":45,"value":3330},{"type":39,"tag":67,"props":3428,"children":3429},{"style":80},[3430],{"type":45,"value":3431},"?.",{"type":39,"tag":67,"props":3433,"children":3434},{"style":86},[3435],{"type":45,"value":1583},{"type":39,"tag":67,"props":3437,"children":3438},{"style":80},[3439],{"type":45,"value":3431},{"type":39,"tag":67,"props":3441,"children":3442},{"style":86},[3443],{"type":45,"value":3444},"headers",{"type":39,"tag":67,"props":3446,"children":3447},{"style":80},[3448],{"type":45,"value":194},{"type":39,"tag":67,"props":3450,"children":3451},{"style":157},[3452],{"type":45,"value":3453},"get",{"type":39,"tag":67,"props":3455,"children":3456},{"style":176},[3457],{"type":45,"value":164},{"type":39,"tag":67,"props":3459,"children":3460},{"style":80},[3461],{"type":45,"value":114},{"type":39,"tag":67,"props":3463,"children":3464},{"style":107},[3465],{"type":45,"value":3049},{"type":39,"tag":67,"props":3467,"children":3468},{"style":80},[3469],{"type":45,"value":114},{"type":39,"tag":67,"props":3471,"children":3472},{"style":176},[3473],{"type":45,"value":233},{"type":39,"tag":67,"props":3475,"children":3476},{"style":80},[3477],{"type":45,"value":629},{"type":39,"tag":67,"props":3479,"children":3480},{"class":69,"line":2458},[3481,3486,3490,3494,3498,3502,3506,3510,3514,3518,3522,3526,3531,3535,3539],{"type":39,"tag":67,"props":3482,"children":3483},{"style":176},[3484],{"type":45,"value":3485},"            userAgent",{"type":39,"tag":67,"props":3487,"children":3488},{"style":80},[3489],{"type":45,"value":184},{"type":39,"tag":67,"props":3491,"children":3492},{"style":86},[3493],{"type":45,"value":3330},{"type":39,"tag":67,"props":3495,"children":3496},{"style":80},[3497],{"type":45,"value":3431},{"type":39,"tag":67,"props":3499,"children":3500},{"style":86},[3501],{"type":45,"value":1583},{"type":39,"tag":67,"props":3503,"children":3504},{"style":80},[3505],{"type":45,"value":3431},{"type":39,"tag":67,"props":3507,"children":3508},{"style":86},[3509],{"type":45,"value":3444},{"type":39,"tag":67,"props":3511,"children":3512},{"style":80},[3513],{"type":45,"value":194},{"type":39,"tag":67,"props":3515,"children":3516},{"style":157},[3517],{"type":45,"value":3453},{"type":39,"tag":67,"props":3519,"children":3520},{"style":176},[3521],{"type":45,"value":164},{"type":39,"tag":67,"props":3523,"children":3524},{"style":80},[3525],{"type":45,"value":114},{"type":39,"tag":67,"props":3527,"children":3528},{"style":107},[3529],{"type":45,"value":3530},"user-agent",{"type":39,"tag":67,"props":3532,"children":3533},{"style":80},[3534],{"type":45,"value":114},{"type":39,"tag":67,"props":3536,"children":3537},{"style":176},[3538],{"type":45,"value":233},{"type":39,"tag":67,"props":3540,"children":3541},{"style":80},[3542],{"type":45,"value":629},{"type":39,"tag":67,"props":3544,"children":3545},{"class":69,"line":2466},[3546,3551,3555],{"type":39,"tag":67,"props":3547,"children":3548},{"style":80},[3549],{"type":45,"value":3550},"          }",{"type":39,"tag":67,"props":3552,"children":3553},{"style":176},[3554],{"type":45,"value":233},{"type":39,"tag":67,"props":3556,"children":3557},{"style":80},[3558],{"type":45,"value":119},{"type":39,"tag":67,"props":3560,"children":3562},{"class":69,"line":3561},13,[3563],{"type":39,"tag":67,"props":3564,"children":3565},{"style":80},[3566],{"type":45,"value":3567},"        },\n",{"type":39,"tag":67,"props":3569,"children":3571},{"class":69,"line":3570},14,[3572],{"type":39,"tag":67,"props":3573,"children":3574},{"style":80},[3575],{"type":45,"value":3576},"      },\n",{"type":39,"tag":67,"props":3578,"children":3580},{"class":69,"line":3579},15,[3581,3586,3590],{"type":39,"tag":67,"props":3582,"children":3583},{"style":176},[3584],{"type":45,"value":3585},"      delete",{"type":39,"tag":67,"props":3587,"children":3588},{"style":80},[3589],{"type":45,"value":184},{"type":39,"tag":67,"props":3591,"children":3592},{"style":80},[3593],{"type":45,"value":433},{"type":39,"tag":67,"props":3595,"children":3597},{"class":69,"line":3596},16,[3598,3603,3607,3611,3615,3619,3623,3627],{"type":39,"tag":67,"props":3599,"children":3600},{"style":157},[3601],{"type":45,"value":3602},"        before",{"type":39,"tag":67,"props":3604,"children":3605},{"style":80},[3606],{"type":45,"value":184},{"type":39,"tag":67,"props":3608,"children":3609},{"style":141},[3610],{"type":45,"value":703},{"type":39,"tag":67,"props":3612,"children":3613},{"style":80},[3614],{"type":45,"value":3317},{"type":39,"tag":67,"props":3616,"children":3617},{"style":711},[3618],{"type":45,"value":776},{"type":39,"tag":67,"props":3620,"children":3621},{"style":80},[3622],{"type":45,"value":3335},{"type":39,"tag":67,"props":3624,"children":3625},{"style":141},[3626],{"type":45,"value":723},{"type":39,"tag":67,"props":3628,"children":3629},{"style":80},[3630],{"type":45,"value":433},{"type":39,"tag":67,"props":3632,"children":3634},{"class":69,"line":3633},17,[3635,3639,3643,3647,3651,3656,3660,3664,3668,3673,3677,3681,3685,3690,3694,3698],{"type":39,"tag":67,"props":3636,"children":3637},{"style":74},[3638],{"type":45,"value":3351},{"type":39,"tag":67,"props":3640,"children":3641},{"style":157},[3642],{"type":45,"value":3356},{"type":39,"tag":67,"props":3644,"children":3645},{"style":176},[3646],{"type":45,"value":164},{"type":39,"tag":67,"props":3648,"children":3649},{"style":80},[3650],{"type":45,"value":114},{"type":39,"tag":67,"props":3652,"children":3653},{"style":107},[3654],{"type":45,"value":3655},"session.revoked",{"type":39,"tag":67,"props":3657,"children":3658},{"style":80},[3659],{"type":45,"value":114},{"type":39,"tag":67,"props":3661,"children":3662},{"style":80},[3663],{"type":45,"value":213},{"type":39,"tag":67,"props":3665,"children":3666},{"style":80},[3667],{"type":45,"value":83},{"type":39,"tag":67,"props":3669,"children":3670},{"style":176},[3671],{"type":45,"value":3672}," sessionId",{"type":39,"tag":67,"props":3674,"children":3675},{"style":80},[3676],{"type":45,"value":184},{"type":39,"tag":67,"props":3678,"children":3679},{"style":86},[3680],{"type":45,"value":776},{"type":39,"tag":67,"props":3682,"children":3683},{"style":80},[3684],{"type":45,"value":194},{"type":39,"tag":67,"props":3686,"children":3687},{"style":86},[3688],{"type":45,"value":3689},"id",{"type":39,"tag":67,"props":3691,"children":3692},{"style":80},[3693],{"type":45,"value":94},{"type":39,"tag":67,"props":3695,"children":3696},{"style":176},[3697],{"type":45,"value":233},{"type":39,"tag":67,"props":3699,"children":3700},{"style":80},[3701],{"type":45,"value":119},{"type":39,"tag":67,"props":3703,"children":3705},{"class":69,"line":3704},18,[3706],{"type":39,"tag":67,"props":3707,"children":3708},{"style":80},[3709],{"type":45,"value":3567},{"type":39,"tag":67,"props":3711,"children":3713},{"class":69,"line":3712},19,[3714],{"type":39,"tag":67,"props":3715,"children":3716},{"style":80},[3717],{"type":45,"value":3576},{"type":39,"tag":67,"props":3719,"children":3721},{"class":69,"line":3720},20,[3722],{"type":39,"tag":67,"props":3723,"children":3724},{"style":80},[3725],{"type":45,"value":743},{"type":39,"tag":67,"props":3727,"children":3729},{"class":69,"line":3728},21,[3730,3735,3739],{"type":39,"tag":67,"props":3731,"children":3732},{"style":176},[3733],{"type":45,"value":3734},"    user",{"type":39,"tag":67,"props":3736,"children":3737},{"style":80},[3738],{"type":45,"value":184},{"type":39,"tag":67,"props":3740,"children":3741},{"style":80},[3742],{"type":45,"value":433},{"type":39,"tag":67,"props":3744,"children":3746},{"class":69,"line":3745},22,[3747,3752,3756],{"type":39,"tag":67,"props":3748,"children":3749},{"style":176},[3750],{"type":45,"value":3751},"      update",{"type":39,"tag":67,"props":3753,"children":3754},{"style":80},[3755],{"type":45,"value":184},{"type":39,"tag":67,"props":3757,"children":3758},{"style":80},[3759],{"type":45,"value":433},{"type":39,"tag":67,"props":3761,"children":3763},{"class":69,"line":3762},23,[3764,3768,3772,3776,3780,3784,3788,3793,3797,3801],{"type":39,"tag":67,"props":3765,"children":3766},{"style":157},[3767],{"type":45,"value":3304},{"type":39,"tag":67,"props":3769,"children":3770},{"style":80},[3771],{"type":45,"value":184},{"type":39,"tag":67,"props":3773,"children":3774},{"style":141},[3775],{"type":45,"value":703},{"type":39,"tag":67,"props":3777,"children":3778},{"style":80},[3779],{"type":45,"value":3317},{"type":39,"tag":67,"props":3781,"children":3782},{"style":711},[3783],{"type":45,"value":776},{"type":39,"tag":67,"props":3785,"children":3786},{"style":80},[3787],{"type":45,"value":213},{"type":39,"tag":67,"props":3789,"children":3790},{"style":711},[3791],{"type":45,"value":3792}," oldData",{"type":39,"tag":67,"props":3794,"children":3795},{"style":80},[3796],{"type":45,"value":3335},{"type":39,"tag":67,"props":3798,"children":3799},{"style":141},[3800],{"type":45,"value":723},{"type":39,"tag":67,"props":3802,"children":3803},{"style":80},[3804],{"type":45,"value":433},{"type":39,"tag":67,"props":3806,"children":3808},{"class":69,"line":3807},24,[3809,3814,3818,3823,3827,3832,3837,3841,3845,3849,3854],{"type":39,"tag":67,"props":3810,"children":3811},{"style":74},[3812],{"type":45,"value":3813},"          if",{"type":39,"tag":67,"props":3815,"children":3816},{"style":176},[3817],{"type":45,"value":708},{"type":39,"tag":67,"props":3819,"children":3820},{"style":86},[3821],{"type":45,"value":3822},"oldData",{"type":39,"tag":67,"props":3824,"children":3825},{"style":80},[3826],{"type":45,"value":3431},{"type":39,"tag":67,"props":3828,"children":3829},{"style":86},[3830],{"type":45,"value":3831},"email",{"type":39,"tag":67,"props":3833,"children":3834},{"style":80},[3835],{"type":45,"value":3836}," !==",{"type":39,"tag":67,"props":3838,"children":3839},{"style":86},[3840],{"type":45,"value":776},{"type":39,"tag":67,"props":3842,"children":3843},{"style":80},[3844],{"type":45,"value":194},{"type":39,"tag":67,"props":3846,"children":3847},{"style":86},[3848],{"type":45,"value":3831},{"type":39,"tag":67,"props":3850,"children":3851},{"style":176},[3852],{"type":45,"value":3853},") ",{"type":39,"tag":67,"props":3855,"children":3856},{"style":80},[3857],{"type":45,"value":169},{"type":39,"tag":67,"props":3859,"children":3861},{"class":69,"line":3860},25,[3862,3867,3871,3875,3879,3884,3888,3892],{"type":39,"tag":67,"props":3863,"children":3864},{"style":74},[3865],{"type":45,"value":3866},"            await",{"type":39,"tag":67,"props":3868,"children":3869},{"style":157},[3870],{"type":45,"value":3356},{"type":39,"tag":67,"props":3872,"children":3873},{"style":176},[3874],{"type":45,"value":164},{"type":39,"tag":67,"props":3876,"children":3877},{"style":80},[3878],{"type":45,"value":114},{"type":39,"tag":67,"props":3880,"children":3881},{"style":107},[3882],{"type":45,"value":3883},"user.email_changed",{"type":39,"tag":67,"props":3885,"children":3886},{"style":80},[3887],{"type":45,"value":114},{"type":39,"tag":67,"props":3889,"children":3890},{"style":80},[3891],{"type":45,"value":213},{"type":39,"tag":67,"props":3893,"children":3894},{"style":80},[3895],{"type":45,"value":433},{"type":39,"tag":67,"props":3897,"children":3899},{"class":69,"line":3898},26,[3900,3905,3909,3913,3917,3921],{"type":39,"tag":67,"props":3901,"children":3902},{"style":176},[3903],{"type":45,"value":3904},"              userId",{"type":39,"tag":67,"props":3906,"children":3907},{"style":80},[3908],{"type":45,"value":184},{"type":39,"tag":67,"props":3910,"children":3911},{"style":86},[3912],{"type":45,"value":776},{"type":39,"tag":67,"props":3914,"children":3915},{"style":80},[3916],{"type":45,"value":194},{"type":39,"tag":67,"props":3918,"children":3919},{"style":86},[3920],{"type":45,"value":3689},{"type":39,"tag":67,"props":3922,"children":3923},{"style":80},[3924],{"type":45,"value":629},{"type":39,"tag":67,"props":3926,"children":3928},{"class":69,"line":3927},27,[3929,3934,3938,3942,3946,3950],{"type":39,"tag":67,"props":3930,"children":3931},{"style":176},[3932],{"type":45,"value":3933},"              oldEmail",{"type":39,"tag":67,"props":3935,"children":3936},{"style":80},[3937],{"type":45,"value":184},{"type":39,"tag":67,"props":3939,"children":3940},{"style":86},[3941],{"type":45,"value":3792},{"type":39,"tag":67,"props":3943,"children":3944},{"style":80},[3945],{"type":45,"value":3431},{"type":39,"tag":67,"props":3947,"children":3948},{"style":86},[3949],{"type":45,"value":3831},{"type":39,"tag":67,"props":3951,"children":3952},{"style":80},[3953],{"type":45,"value":629},{"type":39,"tag":67,"props":3955,"children":3956},{"class":69,"line":27},[3957,3962,3966,3970,3974,3978],{"type":39,"tag":67,"props":3958,"children":3959},{"style":176},[3960],{"type":45,"value":3961},"              newEmail",{"type":39,"tag":67,"props":3963,"children":3964},{"style":80},[3965],{"type":45,"value":184},{"type":39,"tag":67,"props":3967,"children":3968},{"style":86},[3969],{"type":45,"value":776},{"type":39,"tag":67,"props":3971,"children":3972},{"style":80},[3973],{"type":45,"value":194},{"type":39,"tag":67,"props":3975,"children":3976},{"style":86},[3977],{"type":45,"value":3831},{"type":39,"tag":67,"props":3979,"children":3980},{"style":80},[3981],{"type":45,"value":629},{"type":39,"tag":67,"props":3983,"children":3985},{"class":69,"line":3984},29,[3986,3991,3995],{"type":39,"tag":67,"props":3987,"children":3988},{"style":80},[3989],{"type":45,"value":3990},"            }",{"type":39,"tag":67,"props":3992,"children":3993},{"style":176},[3994],{"type":45,"value":233},{"type":39,"tag":67,"props":3996,"children":3997},{"style":80},[3998],{"type":45,"value":119},{"type":39,"tag":67,"props":4000,"children":4002},{"class":69,"line":4001},30,[4003],{"type":39,"tag":67,"props":4004,"children":4005},{"style":80},[4006],{"type":45,"value":4007},"          }\n",{"type":39,"tag":67,"props":4009,"children":4011},{"class":69,"line":4010},31,[4012],{"type":39,"tag":67,"props":4013,"children":4014},{"style":80},[4015],{"type":45,"value":3567},{"type":39,"tag":67,"props":4017,"children":4019},{"class":69,"line":4018},32,[4020],{"type":39,"tag":67,"props":4021,"children":4022},{"style":80},[4023],{"type":45,"value":3576},{"type":39,"tag":67,"props":4025,"children":4027},{"class":69,"line":4026},33,[4028],{"type":39,"tag":67,"props":4029,"children":4030},{"style":80},[4031],{"type":45,"value":743},{"type":39,"tag":67,"props":4033,"children":4035},{"class":69,"line":4034},34,[4036,4041,4045],{"type":39,"tag":67,"props":4037,"children":4038},{"style":176},[4039],{"type":45,"value":4040},"    account",{"type":39,"tag":67,"props":4042,"children":4043},{"style":80},[4044],{"type":45,"value":184},{"type":39,"tag":67,"props":4046,"children":4047},{"style":80},[4048],{"type":45,"value":433},{"type":39,"tag":67,"props":4050,"children":4052},{"class":69,"line":4051},35,[4053,4057,4061],{"type":39,"tag":67,"props":4054,"children":4055},{"style":176},[4056],{"type":45,"value":3288},{"type":39,"tag":67,"props":4058,"children":4059},{"style":80},[4060],{"type":45,"value":184},{"type":39,"tag":67,"props":4062,"children":4063},{"style":80},[4064],{"type":45,"value":433},{"type":39,"tag":67,"props":4066,"children":4068},{"class":69,"line":4067},36,[4069,4073,4077,4081,4085,4089,4093,4097],{"type":39,"tag":67,"props":4070,"children":4071},{"style":157},[4072],{"type":45,"value":3304},{"type":39,"tag":67,"props":4074,"children":4075},{"style":80},[4076],{"type":45,"value":184},{"type":39,"tag":67,"props":4078,"children":4079},{"style":141},[4080],{"type":45,"value":703},{"type":39,"tag":67,"props":4082,"children":4083},{"style":80},[4084],{"type":45,"value":3317},{"type":39,"tag":67,"props":4086,"children":4087},{"style":711},[4088],{"type":45,"value":776},{"type":39,"tag":67,"props":4090,"children":4091},{"style":80},[4092],{"type":45,"value":3335},{"type":39,"tag":67,"props":4094,"children":4095},{"style":141},[4096],{"type":45,"value":723},{"type":39,"tag":67,"props":4098,"children":4099},{"style":80},[4100],{"type":45,"value":433},{"type":39,"tag":67,"props":4102,"children":4104},{"class":69,"line":4103},37,[4105,4109,4113,4117,4121,4126,4130,4134],{"type":39,"tag":67,"props":4106,"children":4107},{"style":74},[4108],{"type":45,"value":3351},{"type":39,"tag":67,"props":4110,"children":4111},{"style":157},[4112],{"type":45,"value":3356},{"type":39,"tag":67,"props":4114,"children":4115},{"style":176},[4116],{"type":45,"value":164},{"type":39,"tag":67,"props":4118,"children":4119},{"style":80},[4120],{"type":45,"value":114},{"type":39,"tag":67,"props":4122,"children":4123},{"style":107},[4124],{"type":45,"value":4125},"account.linked",{"type":39,"tag":67,"props":4127,"children":4128},{"style":80},[4129],{"type":45,"value":114},{"type":39,"tag":67,"props":4131,"children":4132},{"style":80},[4133],{"type":45,"value":213},{"type":39,"tag":67,"props":4135,"children":4136},{"style":80},[4137],{"type":45,"value":433},{"type":39,"tag":67,"props":4139,"children":4141},{"class":69,"line":4140},38,[4142,4146,4150,4154,4158,4162],{"type":39,"tag":67,"props":4143,"children":4144},{"style":176},[4145],{"type":45,"value":3389},{"type":39,"tag":67,"props":4147,"children":4148},{"style":80},[4149],{"type":45,"value":184},{"type":39,"tag":67,"props":4151,"children":4152},{"style":86},[4153],{"type":45,"value":776},{"type":39,"tag":67,"props":4155,"children":4156},{"style":80},[4157],{"type":45,"value":194},{"type":39,"tag":67,"props":4159,"children":4160},{"style":86},[4161],{"type":45,"value":3406},{"type":39,"tag":67,"props":4163,"children":4164},{"style":80},[4165],{"type":45,"value":629},{"type":39,"tag":67,"props":4167,"children":4169},{"class":69,"line":4168},39,[4170,4175,4179,4183,4187,4192],{"type":39,"tag":67,"props":4171,"children":4172},{"style":176},[4173],{"type":45,"value":4174},"            provider",{"type":39,"tag":67,"props":4176,"children":4177},{"style":80},[4178],{"type":45,"value":184},{"type":39,"tag":67,"props":4180,"children":4181},{"style":86},[4182],{"type":45,"value":776},{"type":39,"tag":67,"props":4184,"children":4185},{"style":80},[4186],{"type":45,"value":194},{"type":39,"tag":67,"props":4188,"children":4189},{"style":86},[4190],{"type":45,"value":4191},"providerId",{"type":39,"tag":67,"props":4193,"children":4194},{"style":80},[4195],{"type":45,"value":629},{"type":39,"tag":67,"props":4197,"children":4199},{"class":69,"line":4198},40,[4200,4204,4208],{"type":39,"tag":67,"props":4201,"children":4202},{"style":80},[4203],{"type":45,"value":3550},{"type":39,"tag":67,"props":4205,"children":4206},{"style":176},[4207],{"type":45,"value":233},{"type":39,"tag":67,"props":4209,"children":4210},{"style":80},[4211],{"type":45,"value":119},{"type":39,"tag":67,"props":4213,"children":4215},{"class":69,"line":4214},41,[4216],{"type":39,"tag":67,"props":4217,"children":4218},{"style":80},[4219],{"type":45,"value":3567},{"type":39,"tag":67,"props":4221,"children":4223},{"class":69,"line":4222},42,[4224],{"type":39,"tag":67,"props":4225,"children":4226},{"style":80},[4227],{"type":45,"value":3576},{"type":39,"tag":67,"props":4229,"children":4231},{"class":69,"line":4230},43,[4232],{"type":39,"tag":67,"props":4233,"children":4234},{"style":80},[4235],{"type":45,"value":743},{"type":39,"tag":67,"props":4237,"children":4239},{"class":69,"line":4238},44,[4240],{"type":39,"tag":67,"props":4241,"children":4242},{"style":80},[4243],{"type":45,"value":524},{"type":39,"tag":67,"props":4245,"children":4247},{"class":69,"line":4246},45,[4248,4252,4256],{"type":39,"tag":67,"props":4249,"children":4250},{"style":80},[4251],{"type":45,"value":228},{"type":39,"tag":67,"props":4253,"children":4254},{"style":86},[4255],{"type":45,"value":233},{"type":39,"tag":67,"props":4257,"children":4258},{"style":80},[4259],{"type":45,"value":119},{"type":39,"tag":239,"props":4261,"children":4262},{},[4263,4265,4270,4272,4278],{"type":45,"value":4264},"Return ",{"type":39,"tag":63,"props":4266,"children":4268},{"className":4267},[],[4269],{"type":45,"value":1007},{"type":45,"value":4271}," from a ",{"type":39,"tag":63,"props":4273,"children":4275},{"className":4274},[],[4276],{"type":45,"value":4277},"before",{"type":45,"value":4279}," hook to prevent an operation.",{"type":39,"tag":40,"props":4281,"children":4283},{"id":4282},"background-tasks",[4284],{"type":45,"value":4285},"Background Tasks",{"type":39,"tag":55,"props":4287,"children":4289},{"className":57,"code":4288,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  advanced: {\n    backgroundTasks: {\n      handler: (promise) => {\n        \u002F\u002F Platform-specific handler\n        \u002F\u002F Vercel: waitUntil(promise)\n        \u002F\u002F Cloudflare: ctx.waitUntil(promise)\n        waitUntil(promise);\n      },\n    },\n  },\n});\n",[4290],{"type":39,"tag":63,"props":4291,"children":4292},{"__ignoreMap":60},[4293,4332,4339,4370,4385,4401,4434,4442,4450,4458,4482,4489,4496,4503],{"type":39,"tag":67,"props":4294,"children":4295},{"class":69,"line":70},[4296,4300,4304,4308,4312,4316,4320,4324,4328],{"type":39,"tag":67,"props":4297,"children":4298},{"style":74},[4299],{"type":45,"value":77},{"type":39,"tag":67,"props":4301,"children":4302},{"style":80},[4303],{"type":45,"value":83},{"type":39,"tag":67,"props":4305,"children":4306},{"style":86},[4307],{"type":45,"value":89},{"type":39,"tag":67,"props":4309,"children":4310},{"style":80},[4311],{"type":45,"value":94},{"type":39,"tag":67,"props":4313,"children":4314},{"style":74},[4315],{"type":45,"value":99},{"type":39,"tag":67,"props":4317,"children":4318},{"style":80},[4319],{"type":45,"value":104},{"type":39,"tag":67,"props":4321,"children":4322},{"style":107},[4323],{"type":45,"value":8},{"type":39,"tag":67,"props":4325,"children":4326},{"style":80},[4327],{"type":45,"value":114},{"type":39,"tag":67,"props":4329,"children":4330},{"style":80},[4331],{"type":45,"value":119},{"type":39,"tag":67,"props":4333,"children":4334},{"class":69,"line":122},[4335],{"type":39,"tag":67,"props":4336,"children":4337},{"emptyLinePlaceholder":126},[4338],{"type":45,"value":129},{"type":39,"tag":67,"props":4340,"children":4341},{"class":69,"line":132},[4342,4346,4350,4354,4358,4362,4366],{"type":39,"tag":67,"props":4343,"children":4344},{"style":74},[4345],{"type":45,"value":138},{"type":39,"tag":67,"props":4347,"children":4348},{"style":141},[4349],{"type":45,"value":144},{"type":39,"tag":67,"props":4351,"children":4352},{"style":86},[4353],{"type":45,"value":149},{"type":39,"tag":67,"props":4355,"children":4356},{"style":80},[4357],{"type":45,"value":154},{"type":39,"tag":67,"props":4359,"children":4360},{"style":157},[4361],{"type":45,"value":89},{"type":39,"tag":67,"props":4363,"children":4364},{"style":86},[4365],{"type":45,"value":164},{"type":39,"tag":67,"props":4367,"children":4368},{"style":80},[4369],{"type":45,"value":169},{"type":39,"tag":67,"props":4371,"children":4372},{"class":69,"line":172},[4373,4377,4381],{"type":39,"tag":67,"props":4374,"children":4375},{"style":176},[4376],{"type":45,"value":1139},{"type":39,"tag":67,"props":4378,"children":4379},{"style":80},[4380],{"type":45,"value":184},{"type":39,"tag":67,"props":4382,"children":4383},{"style":80},[4384],{"type":45,"value":433},{"type":39,"tag":67,"props":4386,"children":4387},{"class":69,"line":222},[4388,4393,4397],{"type":39,"tag":67,"props":4389,"children":4390},{"style":176},[4391],{"type":45,"value":4392},"    backgroundTasks",{"type":39,"tag":67,"props":4394,"children":4395},{"style":80},[4396],{"type":45,"value":184},{"type":39,"tag":67,"props":4398,"children":4399},{"style":80},[4400],{"type":45,"value":433},{"type":39,"tag":67,"props":4402,"children":4403},{"class":69,"line":463},[4404,4409,4413,4417,4422,4426,4430],{"type":39,"tag":67,"props":4405,"children":4406},{"style":157},[4407],{"type":45,"value":4408},"      handler",{"type":39,"tag":67,"props":4410,"children":4411},{"style":80},[4412],{"type":45,"value":184},{"type":39,"tag":67,"props":4414,"children":4415},{"style":80},[4416],{"type":45,"value":708},{"type":39,"tag":67,"props":4418,"children":4419},{"style":711},[4420],{"type":45,"value":4421},"promise",{"type":39,"tag":67,"props":4423,"children":4424},{"style":80},[4425],{"type":45,"value":233},{"type":39,"tag":67,"props":4427,"children":4428},{"style":141},[4429],{"type":45,"value":723},{"type":39,"tag":67,"props":4431,"children":4432},{"style":80},[4433],{"type":45,"value":433},{"type":39,"tag":67,"props":4435,"children":4436},{"class":69,"line":491},[4437],{"type":39,"tag":67,"props":4438,"children":4439},{"style":216},[4440],{"type":45,"value":4441},"        \u002F\u002F Platform-specific handler\n",{"type":39,"tag":67,"props":4443,"children":4444},{"class":69,"line":518},[4445],{"type":39,"tag":67,"props":4446,"children":4447},{"style":216},[4448],{"type":45,"value":4449},"        \u002F\u002F Vercel: waitUntil(promise)\n",{"type":39,"tag":67,"props":4451,"children":4452},{"class":69,"line":527},[4453],{"type":39,"tag":67,"props":4454,"children":4455},{"style":216},[4456],{"type":45,"value":4457},"        \u002F\u002F Cloudflare: ctx.waitUntil(promise)\n",{"type":39,"tag":67,"props":4459,"children":4460},{"class":69,"line":813},[4461,4466,4470,4474,4478],{"type":39,"tag":67,"props":4462,"children":4463},{"style":157},[4464],{"type":45,"value":4465},"        waitUntil",{"type":39,"tag":67,"props":4467,"children":4468},{"style":176},[4469],{"type":45,"value":164},{"type":39,"tag":67,"props":4471,"children":4472},{"style":86},[4473],{"type":45,"value":4421},{"type":39,"tag":67,"props":4475,"children":4476},{"style":176},[4477],{"type":45,"value":233},{"type":39,"tag":67,"props":4479,"children":4480},{"style":80},[4481],{"type":45,"value":119},{"type":39,"tag":67,"props":4483,"children":4484},{"class":69,"line":2458},[4485],{"type":39,"tag":67,"props":4486,"children":4487},{"style":80},[4488],{"type":45,"value":3576},{"type":39,"tag":67,"props":4490,"children":4491},{"class":69,"line":2466},[4492],{"type":39,"tag":67,"props":4493,"children":4494},{"style":80},[4495],{"type":45,"value":743},{"type":39,"tag":67,"props":4497,"children":4498},{"class":69,"line":3561},[4499],{"type":39,"tag":67,"props":4500,"children":4501},{"style":80},[4502],{"type":45,"value":524},{"type":39,"tag":67,"props":4504,"children":4505},{"class":69,"line":3570},[4506,4510,4514],{"type":39,"tag":67,"props":4507,"children":4508},{"style":80},[4509],{"type":45,"value":228},{"type":39,"tag":67,"props":4511,"children":4512},{"style":86},[4513],{"type":45,"value":233},{"type":39,"tag":67,"props":4515,"children":4516},{"style":80},[4517],{"type":45,"value":119},{"type":39,"tag":239,"props":4519,"children":4520},{},[4521],{"type":45,"value":4522},"Ensures operations like sending emails don't affect response timing.",{"type":39,"tag":40,"props":4524,"children":4526},{"id":4525},"account-enumeration-prevention",[4527],{"type":45,"value":4528},"Account Enumeration Prevention",{"type":39,"tag":239,"props":4530,"children":4531},{},[4532],{"type":45,"value":4533},"Built-in: consistent response messages, dummy operations on invalid requests, background email sending. Return generic error messages (\"Invalid credentials\") rather than specific ones (\"User not found\").",{"type":39,"tag":40,"props":4535,"children":4537},{"id":4536},"complete-security-configuration-example",[4538],{"type":45,"value":4539},"Complete Security Configuration Example",{"type":39,"tag":55,"props":4541,"children":4543},{"className":57,"code":4542,"language":59,"meta":60,"style":60},"import { betterAuth } from \"better-auth\";\n\nexport const auth = betterAuth({\n  secret: process.env.BETTER_AUTH_SECRET,\n  baseURL: \"https:\u002F\u002Fapi.example.com\",\n  trustedOrigins: [\n    \"https:\u002F\u002Fapp.example.com\",\n    \"https:\u002F\u002F*.preview.example.com\",\n  ],\n  \n  \u002F\u002F Rate limiting\n  rateLimit: {\n    enabled: true,\n    storage: \"secondary-storage\",\n    customRules: {\n      \"\u002Fapi\u002Fauth\u002Fsign-in\u002Femail\": { window: 60, max: 5 },\n      \"\u002Fapi\u002Fauth\u002Fsign-up\u002Femail\": { window: 60, max: 3 },\n    },\n  },\n  \n  \u002F\u002F Session security\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days\n    updateAge: 60 * 60 * 24, \u002F\u002F 24 hours\n    freshAge: 60 * 60, \u002F\u002F 1 hour for sensitive actions\n    cookieCache: {\n      enabled: true,\n      maxAge: 300,\n      strategy: \"jwe\", \u002F\u002F Encrypted session data\n    },\n  },\n  \n  \u002F\u002F OAuth security\n  account: {\n    encryptOAuthTokens: true,\n    storeStateStrategy: \"cookie\",\n  },\n  \n  \n  \u002F\u002F Advanced settings\n  advanced: {\n    useSecureCookies: true,\n    cookiePrefix: \"myapp\",\n    defaultCookieAttributes: {\n      sameSite: \"lax\",\n    },\n    ipAddress: {\n      ipAddressHeaders: [\"x-forwarded-for\"],\n      ipv6Subnet: 64,\n    },\n    backgroundTasks: {\n      handler: (promise) => waitUntil(promise),\n    },\n  },\n  \n  \u002F\u002F Security auditing\n  databaseHooks: {\n    session: {\n      create: {\n        after: async ({ data, ctx }) => {\n          console.log(`New session for user ${data.userId}`);\n        },\n      },\n    },\n    user: {\n      update: {\n        after: async ({ data, oldData }) => {\n          if (oldData?.email !== data.email) {\n            console.log(`Email changed for user ${data.id}`);\n          }\n        },\n      },\n    },\n  },\n});\n",[4544],{"type":39,"tag":63,"props":4545,"children":4546},{"__ignoreMap":60},[4547,4586,4593,4624,4659,4686,4701,4720,4740,4751,4759,4767,4782,4801,4830,4846,4905,4962,4969,4976,4983,4991,5006,5054,5094,5127,5143,5163,5184,5218,5225,5232,5239,5247,5262,5282,5309,5316,5323,5330,5338,5353,5372,5399,5414,5442,5450,5466,5502,5524,5532,5548,5590,5598,5606,5614,5623,5639,5655,5671,5715,5776,5784,5792,5800,5816,5832,5876,5924,5982,5990,5998,6006,6014,6022],{"type":39,"tag":67,"props":4548,"children":4549},{"class":69,"line":70},[4550,4554,4558,4562,4566,4570,4574,4578,4582],{"type":39,"tag":67,"props":4551,"children":4552},{"style":74},[4553],{"type":45,"value":77},{"type":39,"tag":67,"props":4555,"children":4556},{"style":80},[4557],{"type":45,"value":83},{"type":39,"tag":67,"props":4559,"children":4560},{"style":86},[4561],{"type":45,"value":89},{"type":39,"tag":67,"props":4563,"children":4564},{"style":80},[4565],{"type":45,"value":94},{"type":39,"tag":67,"props":4567,"children":4568},{"style":74},[4569],{"type":45,"value":99},{"type":39,"tag":67,"props":4571,"children":4572},{"style":80},[4573],{"type":45,"value":104},{"type":39,"tag":67,"props":4575,"children":4576},{"style":107},[4577],{"type":45,"value":8},{"type":39,"tag":67,"props":4579,"children":4580},{"style":80},[4581],{"type":45,"value":114},{"type":39,"tag":67,"props":4583,"children":4584},{"style":80},[4585],{"type":45,"value":119},{"type":39,"tag":67,"props":4587,"children":4588},{"class":69,"line":122},[4589],{"type":39,"tag":67,"props":4590,"children":4591},{"emptyLinePlaceholder":126},[4592],{"type":45,"value":129},{"type":39,"tag":67,"props":4594,"children":4595},{"class":69,"line":132},[4596,4600,4604,4608,4612,4616,4620],{"type":39,"tag":67,"props":4597,"children":4598},{"style":74},[4599],{"type":45,"value":138},{"type":39,"tag":67,"props":4601,"children":4602},{"style":141},[4603],{"type":45,"value":144},{"type":39,"tag":67,"props":4605,"children":4606},{"style":86},[4607],{"type":45,"value":149},{"type":39,"tag":67,"props":4609,"children":4610},{"style":80},[4611],{"type":45,"value":154},{"type":39,"tag":67,"props":4613,"children":4614},{"style":157},[4615],{"type":45,"value":89},{"type":39,"tag":67,"props":4617,"children":4618},{"style":86},[4619],{"type":45,"value":164},{"type":39,"tag":67,"props":4621,"children":4622},{"style":80},[4623],{"type":45,"value":169},{"type":39,"tag":67,"props":4625,"children":4626},{"class":69,"line":172},[4627,4631,4635,4639,4643,4647,4651,4655],{"type":39,"tag":67,"props":4628,"children":4629},{"style":176},[4630],{"type":45,"value":179},{"type":39,"tag":67,"props":4632,"children":4633},{"style":80},[4634],{"type":45,"value":184},{"type":39,"tag":67,"props":4636,"children":4637},{"style":86},[4638],{"type":45,"value":189},{"type":39,"tag":67,"props":4640,"children":4641},{"style":80},[4642],{"type":45,"value":194},{"type":39,"tag":67,"props":4644,"children":4645},{"style":86},[4646],{"type":45,"value":199},{"type":39,"tag":67,"props":4648,"children":4649},{"style":80},[4650],{"type":45,"value":194},{"type":39,"tag":67,"props":4652,"children":4653},{"style":86},[4654],{"type":45,"value":208},{"type":39,"tag":67,"props":4656,"children":4657},{"style":80},[4658],{"type":45,"value":629},{"type":39,"tag":67,"props":4660,"children":4661},{"class":69,"line":222},[4662,4666,4670,4674,4678,4682],{"type":39,"tag":67,"props":4663,"children":4664},{"style":176},[4665],{"type":45,"value":1304},{"type":39,"tag":67,"props":4667,"children":4668},{"style":80},[4669],{"type":45,"value":184},{"type":39,"tag":67,"props":4671,"children":4672},{"style":80},[4673],{"type":45,"value":104},{"type":39,"tag":67,"props":4675,"children":4676},{"style":107},[4677],{"type":45,"value":1317},{"type":39,"tag":67,"props":4679,"children":4680},{"style":80},[4681],{"type":45,"value":114},{"type":39,"tag":67,"props":4683,"children":4684},{"style":80},[4685],{"type":45,"value":629},{"type":39,"tag":67,"props":4687,"children":4688},{"class":69,"line":463},[4689,4693,4697],{"type":39,"tag":67,"props":4690,"children":4691},{"style":176},[4692],{"type":45,"value":1333},{"type":39,"tag":67,"props":4694,"children":4695},{"style":80},[4696],{"type":45,"value":184},{"type":39,"tag":67,"props":4698,"children":4699},{"style":86},[4700],{"type":45,"value":1342},{"type":39,"tag":67,"props":4702,"children":4703},{"class":69,"line":491},[4704,4708,4712,4716],{"type":39,"tag":67,"props":4705,"children":4706},{"style":80},[4707],{"type":45,"value":905},{"type":39,"tag":67,"props":4709,"children":4710},{"style":107},[4711],{"type":45,"value":1354},{"type":39,"tag":67,"props":4713,"children":4714},{"style":80},[4715],{"type":45,"value":114},{"type":39,"tag":67,"props":4717,"children":4718},{"style":80},[4719],{"type":45,"value":629},{"type":39,"tag":67,"props":4721,"children":4722},{"class":69,"line":518},[4723,4727,4732,4736],{"type":39,"tag":67,"props":4724,"children":4725},{"style":80},[4726],{"type":45,"value":905},{"type":39,"tag":67,"props":4728,"children":4729},{"style":107},[4730],{"type":45,"value":4731},"https:\u002F\u002F*.preview.example.com",{"type":39,"tag":67,"props":4733,"children":4734},{"style":80},[4735],{"type":45,"value":114},{"type":39,"tag":67,"props":4737,"children":4738},{"style":80},[4739],{"type":45,"value":629},{"type":39,"tag":67,"props":4741,"children":4742},{"class":69,"line":527},[4743,4747],{"type":39,"tag":67,"props":4744,"children":4745},{"style":86},[4746],{"type":45,"value":1390},{"type":39,"tag":67,"props":4748,"children":4749},{"style":80},[4750],{"type":45,"value":629},{"type":39,"tag":67,"props":4752,"children":4753},{"class":69,"line":813},[4754],{"type":39,"tag":67,"props":4755,"children":4756},{"style":86},[4757],{"type":45,"value":4758},"  \n",{"type":39,"tag":67,"props":4760,"children":4761},{"class":69,"line":2458},[4762],{"type":39,"tag":67,"props":4763,"children":4764},{"style":216},[4765],{"type":45,"value":4766},"  \u002F\u002F Rate limiting\n",{"type":39,"tag":67,"props":4768,"children":4769},{"class":69,"line":2466},[4770,4774,4778],{"type":39,"tag":67,"props":4771,"children":4772},{"style":176},[4773],{"type":45,"value":424},{"type":39,"tag":67,"props":4775,"children":4776},{"style":80},[4777],{"type":45,"value":184},{"type":39,"tag":67,"props":4779,"children":4780},{"style":80},[4781],{"type":45,"value":433},{"type":39,"tag":67,"props":4783,"children":4784},{"class":69,"line":3561},[4785,4789,4793,4797],{"type":39,"tag":67,"props":4786,"children":4787},{"style":176},[4788],{"type":45,"value":441},{"type":39,"tag":67,"props":4790,"children":4791},{"style":80},[4792],{"type":45,"value":184},{"type":39,"tag":67,"props":4794,"children":4795},{"style":448},[4796],{"type":45,"value":451},{"type":39,"tag":67,"props":4798,"children":4799},{"style":80},[4800],{"type":45,"value":629},{"type":39,"tag":67,"props":4802,"children":4803},{"class":69,"line":3570},[4804,4809,4813,4817,4822,4826],{"type":39,"tag":67,"props":4805,"children":4806},{"style":176},[4807],{"type":45,"value":4808},"    storage",{"type":39,"tag":67,"props":4810,"children":4811},{"style":80},[4812],{"type":45,"value":184},{"type":39,"tag":67,"props":4814,"children":4815},{"style":80},[4816],{"type":45,"value":104},{"type":39,"tag":67,"props":4818,"children":4819},{"style":107},[4820],{"type":45,"value":4821},"secondary-storage",{"type":39,"tag":67,"props":4823,"children":4824},{"style":80},[4825],{"type":45,"value":114},{"type":39,"tag":67,"props":4827,"children":4828},{"style":80},[4829],{"type":45,"value":629},{"type":39,"tag":67,"props":4831,"children":4832},{"class":69,"line":3579},[4833,4838,4842],{"type":39,"tag":67,"props":4834,"children":4835},{"style":176},[4836],{"type":45,"value":4837},"    customRules",{"type":39,"tag":67,"props":4839,"children":4840},{"style":80},[4841],{"type":45,"value":184},{"type":39,"tag":67,"props":4843,"children":4844},{"style":80},[4845],{"type":45,"value":433},{"type":39,"tag":67,"props":4847,"children":4848},{"class":69,"line":3596},[4849,4854,4858,4862,4866,4870,4875,4879,4883,4887,4892,4896,4900],{"type":39,"tag":67,"props":4850,"children":4851},{"style":80},[4852],{"type":45,"value":4853},"      \"",{"type":39,"tag":67,"props":4855,"children":4856},{"style":176},[4857],{"type":45,"value":910},{"type":39,"tag":67,"props":4859,"children":4860},{"style":80},[4861],{"type":45,"value":114},{"type":39,"tag":67,"props":4863,"children":4864},{"style":80},[4865],{"type":45,"value":184},{"type":39,"tag":67,"props":4867,"children":4868},{"style":80},[4869],{"type":45,"value":83},{"type":39,"tag":67,"props":4871,"children":4872},{"style":176},[4873],{"type":45,"value":4874}," window",{"type":39,"tag":67,"props":4876,"children":4877},{"style":80},[4878],{"type":45,"value":184},{"type":39,"tag":67,"props":4880,"children":4881},{"style":476},[4882],{"type":45,"value":940},{"type":39,"tag":67,"props":4884,"children":4885},{"style":80},[4886],{"type":45,"value":213},{"type":39,"tag":67,"props":4888,"children":4889},{"style":176},[4890],{"type":45,"value":4891}," max",{"type":39,"tag":67,"props":4893,"children":4894},{"style":80},[4895],{"type":45,"value":184},{"type":39,"tag":67,"props":4897,"children":4898},{"style":476},[4899],{"type":45,"value":966},{"type":39,"tag":67,"props":4901,"children":4902},{"style":80},[4903],{"type":45,"value":4904}," },\n",{"type":39,"tag":67,"props":4906,"children":4907},{"class":69,"line":3633},[4908,4912,4917,4921,4925,4929,4933,4937,4941,4945,4949,4953,4958],{"type":39,"tag":67,"props":4909,"children":4910},{"style":80},[4911],{"type":45,"value":4853},{"type":39,"tag":67,"props":4913,"children":4914},{"style":176},[4915],{"type":45,"value":4916},"\u002Fapi\u002Fauth\u002Fsign-up\u002Femail",{"type":39,"tag":67,"props":4918,"children":4919},{"style":80},[4920],{"type":45,"value":114},{"type":39,"tag":67,"props":4922,"children":4923},{"style":80},[4924],{"type":45,"value":184},{"type":39,"tag":67,"props":4926,"children":4927},{"style":80},[4928],{"type":45,"value":83},{"type":39,"tag":67,"props":4930,"children":4931},{"style":176},[4932],{"type":45,"value":4874},{"type":39,"tag":67,"props":4934,"children":4935},{"style":80},[4936],{"type":45,"value":184},{"type":39,"tag":67,"props":4938,"children":4939},{"style":476},[4940],{"type":45,"value":940},{"type":39,"tag":67,"props":4942,"children":4943},{"style":80},[4944],{"type":45,"value":213},{"type":39,"tag":67,"props":4946,"children":4947},{"style":176},[4948],{"type":45,"value":4891},{"type":39,"tag":67,"props":4950,"children":4951},{"style":80},[4952],{"type":45,"value":184},{"type":39,"tag":67,"props":4954,"children":4955},{"style":476},[4956],{"type":45,"value":4957}," 3",{"type":39,"tag":67,"props":4959,"children":4960},{"style":80},[4961],{"type":45,"value":4904},{"type":39,"tag":67,"props":4963,"children":4964},{"class":69,"line":3704},[4965],{"type":39,"tag":67,"props":4966,"children":4967},{"style":80},[4968],{"type":45,"value":743},{"type":39,"tag":67,"props":4970,"children":4971},{"class":69,"line":3712},[4972],{"type":39,"tag":67,"props":4973,"children":4974},{"style":80},[4975],{"type":45,"value":524},{"type":39,"tag":67,"props":4977,"children":4978},{"class":69,"line":3720},[4979],{"type":39,"tag":67,"props":4980,"children":4981},{"style":86},[4982],{"type":45,"value":4758},{"type":39,"tag":67,"props":4984,"children":4985},{"class":69,"line":3728},[4986],{"type":39,"tag":67,"props":4987,"children":4988},{"style":216},[4989],{"type":45,"value":4990},"  \u002F\u002F Session security\n",{"type":39,"tag":67,"props":4992,"children":4993},{"class":69,"line":3745},[4994,4998,5002],{"type":39,"tag":67,"props":4995,"children":4996},{"style":176},[4997],{"type":45,"value":1850},{"type":39,"tag":67,"props":4999,"children":5000},{"style":80},[5001],{"type":45,"value":184},{"type":39,"tag":67,"props":5003,"children":5004},{"style":80},[5005],{"type":45,"value":433},{"type":39,"tag":67,"props":5007,"children":5008},{"class":69,"line":3762},[5009,5013,5017,5021,5025,5029,5033,5037,5041,5045,5049],{"type":39,"tag":67,"props":5010,"children":5011},{"style":176},[5012],{"type":45,"value":1866},{"type":39,"tag":67,"props":5014,"children":5015},{"style":80},[5016],{"type":45,"value":184},{"type":39,"tag":67,"props":5018,"children":5019},{"style":476},[5020],{"type":45,"value":940},{"type":39,"tag":67,"props":5022,"children":5023},{"style":80},[5024],{"type":45,"value":1879},{"type":39,"tag":67,"props":5026,"children":5027},{"style":476},[5028],{"type":45,"value":940},{"type":39,"tag":67,"props":5030,"children":5031},{"style":80},[5032],{"type":45,"value":1879},{"type":39,"tag":67,"props":5034,"children":5035},{"style":476},[5036],{"type":45,"value":1892},{"type":39,"tag":67,"props":5038,"children":5039},{"style":80},[5040],{"type":45,"value":1879},{"type":39,"tag":67,"props":5042,"children":5043},{"style":476},[5044],{"type":45,"value":1901},{"type":39,"tag":67,"props":5046,"children":5047},{"style":80},[5048],{"type":45,"value":213},{"type":39,"tag":67,"props":5050,"children":5051},{"style":216},[5052],{"type":45,"value":5053}," \u002F\u002F 7 days\n",{"type":39,"tag":67,"props":5055,"children":5056},{"class":69,"line":3807},[5057,5061,5065,5069,5073,5077,5081,5085,5089],{"type":39,"tag":67,"props":5058,"children":5059},{"style":176},[5060],{"type":45,"value":1918},{"type":39,"tag":67,"props":5062,"children":5063},{"style":80},[5064],{"type":45,"value":184},{"type":39,"tag":67,"props":5066,"children":5067},{"style":476},[5068],{"type":45,"value":940},{"type":39,"tag":67,"props":5070,"children":5071},{"style":80},[5072],{"type":45,"value":1879},{"type":39,"tag":67,"props":5074,"children":5075},{"style":476},[5076],{"type":45,"value":940},{"type":39,"tag":67,"props":5078,"children":5079},{"style":80},[5080],{"type":45,"value":1879},{"type":39,"tag":67,"props":5082,"children":5083},{"style":476},[5084],{"type":45,"value":1892},{"type":39,"tag":67,"props":5086,"children":5087},{"style":80},[5088],{"type":45,"value":213},{"type":39,"tag":67,"props":5090,"children":5091},{"style":216},[5092],{"type":45,"value":5093}," \u002F\u002F 24 hours\n",{"type":39,"tag":67,"props":5095,"children":5096},{"class":69,"line":3860},[5097,5102,5106,5110,5114,5118,5122],{"type":39,"tag":67,"props":5098,"children":5099},{"style":176},[5100],{"type":45,"value":5101},"    freshAge",{"type":39,"tag":67,"props":5103,"children":5104},{"style":80},[5105],{"type":45,"value":184},{"type":39,"tag":67,"props":5107,"children":5108},{"style":476},[5109],{"type":45,"value":940},{"type":39,"tag":67,"props":5111,"children":5112},{"style":80},[5113],{"type":45,"value":1879},{"type":39,"tag":67,"props":5115,"children":5116},{"style":476},[5117],{"type":45,"value":940},{"type":39,"tag":67,"props":5119,"children":5120},{"style":80},[5121],{"type":45,"value":213},{"type":39,"tag":67,"props":5123,"children":5124},{"style":216},[5125],{"type":45,"value":5126}," \u002F\u002F 1 hour for sensitive actions\n",{"type":39,"tag":67,"props":5128,"children":5129},{"class":69,"line":3898},[5130,5135,5139],{"type":39,"tag":67,"props":5131,"children":5132},{"style":176},[5133],{"type":45,"value":5134},"    cookieCache",{"type":39,"tag":67,"props":5136,"children":5137},{"style":80},[5138],{"type":45,"value":184},{"type":39,"tag":67,"props":5140,"children":5141},{"style":80},[5142],{"type":45,"value":433},{"type":39,"tag":67,"props":5144,"children":5145},{"class":69,"line":3927},[5146,5151,5155,5159],{"type":39,"tag":67,"props":5147,"children":5148},{"style":176},[5149],{"type":45,"value":5150},"      enabled",{"type":39,"tag":67,"props":5152,"children":5153},{"style":80},[5154],{"type":45,"value":184},{"type":39,"tag":67,"props":5156,"children":5157},{"style":448},[5158],{"type":45,"value":451},{"type":39,"tag":67,"props":5160,"children":5161},{"style":80},[5162],{"type":45,"value":629},{"type":39,"tag":67,"props":5164,"children":5165},{"class":69,"line":27},[5166,5171,5175,5180],{"type":39,"tag":67,"props":5167,"children":5168},{"style":176},[5169],{"type":45,"value":5170},"      maxAge",{"type":39,"tag":67,"props":5172,"children":5173},{"style":80},[5174],{"type":45,"value":184},{"type":39,"tag":67,"props":5176,"children":5177},{"style":476},[5178],{"type":45,"value":5179}," 300",{"type":39,"tag":67,"props":5181,"children":5182},{"style":80},[5183],{"type":45,"value":629},{"type":39,"tag":67,"props":5185,"children":5186},{"class":69,"line":3984},[5187,5192,5196,5200,5205,5209,5213],{"type":39,"tag":67,"props":5188,"children":5189},{"style":176},[5190],{"type":45,"value":5191},"      strategy",{"type":39,"tag":67,"props":5193,"children":5194},{"style":80},[5195],{"type":45,"value":184},{"type":39,"tag":67,"props":5197,"children":5198},{"style":80},[5199],{"type":45,"value":104},{"type":39,"tag":67,"props":5201,"children":5202},{"style":107},[5203],{"type":45,"value":5204},"jwe",{"type":39,"tag":67,"props":5206,"children":5207},{"style":80},[5208],{"type":45,"value":114},{"type":39,"tag":67,"props":5210,"children":5211},{"style":80},[5212],{"type":45,"value":213},{"type":39,"tag":67,"props":5214,"children":5215},{"style":216},[5216],{"type":45,"value":5217}," \u002F\u002F Encrypted session data\n",{"type":39,"tag":67,"props":5219,"children":5220},{"class":69,"line":4001},[5221],{"type":39,"tag":67,"props":5222,"children":5223},{"style":80},[5224],{"type":45,"value":743},{"type":39,"tag":67,"props":5226,"children":5227},{"class":69,"line":4010},[5228],{"type":39,"tag":67,"props":5229,"children":5230},{"style":80},[5231],{"type":45,"value":524},{"type":39,"tag":67,"props":5233,"children":5234},{"class":69,"line":4018},[5235],{"type":39,"tag":67,"props":5236,"children":5237},{"style":86},[5238],{"type":45,"value":4758},{"type":39,"tag":67,"props":5240,"children":5241},{"class":69,"line":4026},[5242],{"type":39,"tag":67,"props":5243,"children":5244},{"style":216},[5245],{"type":45,"value":5246},"  \u002F\u002F OAuth security\n",{"type":39,"tag":67,"props":5248,"children":5249},{"class":69,"line":4034},[5250,5254,5258],{"type":39,"tag":67,"props":5251,"children":5252},{"style":176},[5253],{"type":45,"value":2759},{"type":39,"tag":67,"props":5255,"children":5256},{"style":80},[5257],{"type":45,"value":184},{"type":39,"tag":67,"props":5259,"children":5260},{"style":80},[5261],{"type":45,"value":433},{"type":39,"tag":67,"props":5263,"children":5264},{"class":69,"line":4051},[5265,5270,5274,5278],{"type":39,"tag":67,"props":5266,"children":5267},{"style":176},[5268],{"type":45,"value":5269},"    encryptOAuthTokens",{"type":39,"tag":67,"props":5271,"children":5272},{"style":80},[5273],{"type":45,"value":184},{"type":39,"tag":67,"props":5275,"children":5276},{"style":448},[5277],{"type":45,"value":451},{"type":39,"tag":67,"props":5279,"children":5280},{"style":80},[5281],{"type":45,"value":629},{"type":39,"tag":67,"props":5283,"children":5284},{"class":69,"line":4067},[5285,5289,5293,5297,5301,5305],{"type":39,"tag":67,"props":5286,"children":5287},{"style":176},[5288],{"type":45,"value":2775},{"type":39,"tag":67,"props":5290,"children":5291},{"style":80},[5292],{"type":45,"value":184},{"type":39,"tag":67,"props":5294,"children":5295},{"style":80},[5296],{"type":45,"value":104},{"type":39,"tag":67,"props":5298,"children":5299},{"style":107},[5300],{"type":45,"value":2788},{"type":39,"tag":67,"props":5302,"children":5303},{"style":80},[5304],{"type":45,"value":114},{"type":39,"tag":67,"props":5306,"children":5307},{"style":80},[5308],{"type":45,"value":629},{"type":39,"tag":67,"props":5310,"children":5311},{"class":69,"line":4103},[5312],{"type":39,"tag":67,"props":5313,"children":5314},{"style":80},[5315],{"type":45,"value":524},{"type":39,"tag":67,"props":5317,"children":5318},{"class":69,"line":4140},[5319],{"type":39,"tag":67,"props":5320,"children":5321},{"style":86},[5322],{"type":45,"value":4758},{"type":39,"tag":67,"props":5324,"children":5325},{"class":69,"line":4168},[5326],{"type":39,"tag":67,"props":5327,"children":5328},{"style":86},[5329],{"type":45,"value":4758},{"type":39,"tag":67,"props":5331,"children":5332},{"class":69,"line":4198},[5333],{"type":39,"tag":67,"props":5334,"children":5335},{"style":216},[5336],{"type":45,"value":5337},"  \u002F\u002F Advanced settings\n",{"type":39,"tag":67,"props":5339,"children":5340},{"class":69,"line":4214},[5341,5345,5349],{"type":39,"tag":67,"props":5342,"children":5343},{"style":176},[5344],{"type":45,"value":1139},{"type":39,"tag":67,"props":5346,"children":5347},{"style":80},[5348],{"type":45,"value":184},{"type":39,"tag":67,"props":5350,"children":5351},{"style":80},[5352],{"type":45,"value":433},{"type":39,"tag":67,"props":5354,"children":5355},{"class":69,"line":4222},[5356,5360,5364,5368],{"type":39,"tag":67,"props":5357,"children":5358},{"style":176},[5359],{"type":45,"value":2313},{"type":39,"tag":67,"props":5361,"children":5362},{"style":80},[5363],{"type":45,"value":184},{"type":39,"tag":67,"props":5365,"children":5366},{"style":448},[5367],{"type":45,"value":451},{"type":39,"tag":67,"props":5369,"children":5370},{"style":80},[5371],{"type":45,"value":629},{"type":39,"tag":67,"props":5373,"children":5374},{"class":69,"line":4230},[5375,5379,5383,5387,5391,5395],{"type":39,"tag":67,"props":5376,"children":5377},{"style":176},[5378],{"type":45,"value":2338},{"type":39,"tag":67,"props":5380,"children":5381},{"style":80},[5382],{"type":45,"value":184},{"type":39,"tag":67,"props":5384,"children":5385},{"style":80},[5386],{"type":45,"value":104},{"type":39,"tag":67,"props":5388,"children":5389},{"style":107},[5390],{"type":45,"value":2351},{"type":39,"tag":67,"props":5392,"children":5393},{"style":80},[5394],{"type":45,"value":114},{"type":39,"tag":67,"props":5396,"children":5397},{"style":80},[5398],{"type":45,"value":629},{"type":39,"tag":67,"props":5400,"children":5401},{"class":69,"line":4238},[5402,5406,5410],{"type":39,"tag":67,"props":5403,"children":5404},{"style":176},[5405],{"type":45,"value":2372},{"type":39,"tag":67,"props":5407,"children":5408},{"style":80},[5409],{"type":45,"value":184},{"type":39,"tag":67,"props":5411,"children":5412},{"style":80},[5413],{"type":45,"value":433},{"type":39,"tag":67,"props":5415,"children":5416},{"class":69,"line":4246},[5417,5421,5425,5429,5434,5438],{"type":39,"tag":67,"props":5418,"children":5419},{"style":176},[5420],{"type":45,"value":2388},{"type":39,"tag":67,"props":5422,"children":5423},{"style":80},[5424],{"type":45,"value":184},{"type":39,"tag":67,"props":5426,"children":5427},{"style":80},[5428],{"type":45,"value":104},{"type":39,"tag":67,"props":5430,"children":5431},{"style":107},[5432],{"type":45,"value":5433},"lax",{"type":39,"tag":67,"props":5435,"children":5436},{"style":80},[5437],{"type":45,"value":114},{"type":39,"tag":67,"props":5439,"children":5440},{"style":80},[5441],{"type":45,"value":629},{"type":39,"tag":67,"props":5443,"children":5445},{"class":69,"line":5444},46,[5446],{"type":39,"tag":67,"props":5447,"children":5448},{"style":80},[5449],{"type":45,"value":743},{"type":39,"tag":67,"props":5451,"children":5453},{"class":69,"line":5452},47,[5454,5458,5462],{"type":39,"tag":67,"props":5455,"children":5456},{"style":176},[5457],{"type":45,"value":3016},{"type":39,"tag":67,"props":5459,"children":5460},{"style":80},[5461],{"type":45,"value":184},{"type":39,"tag":67,"props":5463,"children":5464},{"style":80},[5465],{"type":45,"value":433},{"type":39,"tag":67,"props":5467,"children":5469},{"class":69,"line":5468},48,[5470,5474,5478,5482,5486,5490,5494,5498],{"type":39,"tag":67,"props":5471,"children":5472},{"style":176},[5473],{"type":45,"value":3032},{"type":39,"tag":67,"props":5475,"children":5476},{"style":80},[5477],{"type":45,"value":184},{"type":39,"tag":67,"props":5479,"children":5480},{"style":86},[5481],{"type":45,"value":1655},{"type":39,"tag":67,"props":5483,"children":5484},{"style":80},[5485],{"type":45,"value":114},{"type":39,"tag":67,"props":5487,"children":5488},{"style":107},[5489],{"type":45,"value":3049},{"type":39,"tag":67,"props":5491,"children":5492},{"style":80},[5493],{"type":45,"value":114},{"type":39,"tag":67,"props":5495,"children":5496},{"style":86},[5497],{"type":45,"value":1693},{"type":39,"tag":67,"props":5499,"children":5500},{"style":80},[5501],{"type":45,"value":629},{"type":39,"tag":67,"props":5503,"children":5505},{"class":69,"line":5504},49,[5506,5511,5515,5520],{"type":39,"tag":67,"props":5507,"children":5508},{"style":176},[5509],{"type":45,"value":5510},"      ipv6Subnet",{"type":39,"tag":67,"props":5512,"children":5513},{"style":80},[5514],{"type":45,"value":184},{"type":39,"tag":67,"props":5516,"children":5517},{"style":476},[5518],{"type":45,"value":5519}," 64",{"type":39,"tag":67,"props":5521,"children":5522},{"style":80},[5523],{"type":45,"value":629},{"type":39,"tag":67,"props":5525,"children":5527},{"class":69,"line":5526},50,[5528],{"type":39,"tag":67,"props":5529,"children":5530},{"style":80},[5531],{"type":45,"value":743},{"type":39,"tag":67,"props":5533,"children":5535},{"class":69,"line":5534},51,[5536,5540,5544],{"type":39,"tag":67,"props":5537,"children":5538},{"style":176},[5539],{"type":45,"value":4392},{"type":39,"tag":67,"props":5541,"children":5542},{"style":80},[5543],{"type":45,"value":184},{"type":39,"tag":67,"props":5545,"children":5546},{"style":80},[5547],{"type":45,"value":433},{"type":39,"tag":67,"props":5549,"children":5551},{"class":69,"line":5550},52,[5552,5556,5560,5564,5568,5572,5576,5581,5586],{"type":39,"tag":67,"props":5553,"children":5554},{"style":157},[5555],{"type":45,"value":4408},{"type":39,"tag":67,"props":5557,"children":5558},{"style":80},[5559],{"type":45,"value":184},{"type":39,"tag":67,"props":5561,"children":5562},{"style":80},[5563],{"type":45,"value":708},{"type":39,"tag":67,"props":5565,"children":5566},{"style":711},[5567],{"type":45,"value":4421},{"type":39,"tag":67,"props":5569,"children":5570},{"style":80},[5571],{"type":45,"value":233},{"type":39,"tag":67,"props":5573,"children":5574},{"style":141},[5575],{"type":45,"value":723},{"type":39,"tag":67,"props":5577,"children":5578},{"style":157},[5579],{"type":45,"value":5580}," waitUntil",{"type":39,"tag":67,"props":5582,"children":5583},{"style":86},[5584],{"type":45,"value":5585},"(promise)",{"type":39,"tag":67,"props":5587,"children":5588},{"style":80},[5589],{"type":45,"value":629},{"type":39,"tag":67,"props":5591,"children":5593},{"class":69,"line":5592},53,[5594],{"type":39,"tag":67,"props":5595,"children":5596},{"style":80},[5597],{"type":45,"value":743},{"type":39,"tag":67,"props":5599,"children":5601},{"class":69,"line":5600},54,[5602],{"type":39,"tag":67,"props":5603,"children":5604},{"style":80},[5605],{"type":45,"value":524},{"type":39,"tag":67,"props":5607,"children":5609},{"class":69,"line":5608},55,[5610],{"type":39,"tag":67,"props":5611,"children":5612},{"style":86},[5613],{"type":45,"value":4758},{"type":39,"tag":67,"props":5615,"children":5617},{"class":69,"line":5616},56,[5618],{"type":39,"tag":67,"props":5619,"children":5620},{"style":216},[5621],{"type":45,"value":5622},"  \u002F\u002F Security auditing\n",{"type":39,"tag":67,"props":5624,"children":5626},{"class":69,"line":5625},57,[5627,5631,5635],{"type":39,"tag":67,"props":5628,"children":5629},{"style":176},[5630],{"type":45,"value":3256},{"type":39,"tag":67,"props":5632,"children":5633},{"style":80},[5634],{"type":45,"value":184},{"type":39,"tag":67,"props":5636,"children":5637},{"style":80},[5638],{"type":45,"value":433},{"type":39,"tag":67,"props":5640,"children":5642},{"class":69,"line":5641},58,[5643,5647,5651],{"type":39,"tag":67,"props":5644,"children":5645},{"style":176},[5646],{"type":45,"value":3272},{"type":39,"tag":67,"props":5648,"children":5649},{"style":80},[5650],{"type":45,"value":184},{"type":39,"tag":67,"props":5652,"children":5653},{"style":80},[5654],{"type":45,"value":433},{"type":39,"tag":67,"props":5656,"children":5658},{"class":69,"line":5657},59,[5659,5663,5667],{"type":39,"tag":67,"props":5660,"children":5661},{"style":176},[5662],{"type":45,"value":3288},{"type":39,"tag":67,"props":5664,"children":5665},{"style":80},[5666],{"type":45,"value":184},{"type":39,"tag":67,"props":5668,"children":5669},{"style":80},[5670],{"type":45,"value":433},{"type":39,"tag":67,"props":5672,"children":5674},{"class":69,"line":5673},60,[5675,5679,5683,5687,5691,5695,5699,5703,5707,5711],{"type":39,"tag":67,"props":5676,"children":5677},{"style":157},[5678],{"type":45,"value":3304},{"type":39,"tag":67,"props":5680,"children":5681},{"style":80},[5682],{"type":45,"value":184},{"type":39,"tag":67,"props":5684,"children":5685},{"style":141},[5686],{"type":45,"value":703},{"type":39,"tag":67,"props":5688,"children":5689},{"style":80},[5690],{"type":45,"value":3317},{"type":39,"tag":67,"props":5692,"children":5693},{"style":711},[5694],{"type":45,"value":776},{"type":39,"tag":67,"props":5696,"children":5697},{"style":80},[5698],{"type":45,"value":213},{"type":39,"tag":67,"props":5700,"children":5701},{"style":711},[5702],{"type":45,"value":3330},{"type":39,"tag":67,"props":5704,"children":5705},{"style":80},[5706],{"type":45,"value":3335},{"type":39,"tag":67,"props":5708,"children":5709},{"style":141},[5710],{"type":45,"value":723},{"type":39,"tag":67,"props":5712,"children":5713},{"style":80},[5714],{"type":45,"value":433},{"type":39,"tag":67,"props":5716,"children":5718},{"class":69,"line":5717},61,[5719,5724,5728,5733,5737,5741,5746,5750,5755,5759,5763,5768,5772],{"type":39,"tag":67,"props":5720,"children":5721},{"style":86},[5722],{"type":45,"value":5723},"          console",{"type":39,"tag":67,"props":5725,"children":5726},{"style":80},[5727],{"type":45,"value":194},{"type":39,"tag":67,"props":5729,"children":5730},{"style":157},[5731],{"type":45,"value":5732},"log",{"type":39,"tag":67,"props":5734,"children":5735},{"style":176},[5736],{"type":45,"value":164},{"type":39,"tag":67,"props":5738,"children":5739},{"style":80},[5740],{"type":45,"value":1660},{"type":39,"tag":67,"props":5742,"children":5743},{"style":107},[5744],{"type":45,"value":5745},"New session for user ",{"type":39,"tag":67,"props":5747,"children":5748},{"style":80},[5749],{"type":45,"value":1670},{"type":39,"tag":67,"props":5751,"children":5752},{"style":86},[5753],{"type":45,"value":5754},"data",{"type":39,"tag":67,"props":5756,"children":5757},{"style":80},[5758],{"type":45,"value":194},{"type":39,"tag":67,"props":5760,"children":5761},{"style":86},[5762],{"type":45,"value":3406},{"type":39,"tag":67,"props":5764,"children":5765},{"style":80},[5766],{"type":45,"value":5767},"}`",{"type":39,"tag":67,"props":5769,"children":5770},{"style":176},[5771],{"type":45,"value":233},{"type":39,"tag":67,"props":5773,"children":5774},{"style":80},[5775],{"type":45,"value":119},{"type":39,"tag":67,"props":5777,"children":5779},{"class":69,"line":5778},62,[5780],{"type":39,"tag":67,"props":5781,"children":5782},{"style":80},[5783],{"type":45,"value":3567},{"type":39,"tag":67,"props":5785,"children":5787},{"class":69,"line":5786},63,[5788],{"type":39,"tag":67,"props":5789,"children":5790},{"style":80},[5791],{"type":45,"value":3576},{"type":39,"tag":67,"props":5793,"children":5795},{"class":69,"line":5794},64,[5796],{"type":39,"tag":67,"props":5797,"children":5798},{"style":80},[5799],{"type":45,"value":743},{"type":39,"tag":67,"props":5801,"children":5803},{"class":69,"line":5802},65,[5804,5808,5812],{"type":39,"tag":67,"props":5805,"children":5806},{"style":176},[5807],{"type":45,"value":3734},{"type":39,"tag":67,"props":5809,"children":5810},{"style":80},[5811],{"type":45,"value":184},{"type":39,"tag":67,"props":5813,"children":5814},{"style":80},[5815],{"type":45,"value":433},{"type":39,"tag":67,"props":5817,"children":5819},{"class":69,"line":5818},66,[5820,5824,5828],{"type":39,"tag":67,"props":5821,"children":5822},{"style":176},[5823],{"type":45,"value":3751},{"type":39,"tag":67,"props":5825,"children":5826},{"style":80},[5827],{"type":45,"value":184},{"type":39,"tag":67,"props":5829,"children":5830},{"style":80},[5831],{"type":45,"value":433},{"type":39,"tag":67,"props":5833,"children":5835},{"class":69,"line":5834},67,[5836,5840,5844,5848,5852,5856,5860,5864,5868,5872],{"type":39,"tag":67,"props":5837,"children":5838},{"style":157},[5839],{"type":45,"value":3304},{"type":39,"tag":67,"props":5841,"children":5842},{"style":80},[5843],{"type":45,"value":184},{"type":39,"tag":67,"props":5845,"children":5846},{"style":141},[5847],{"type":45,"value":703},{"type":39,"tag":67,"props":5849,"children":5850},{"style":80},[5851],{"type":45,"value":3317},{"type":39,"tag":67,"props":5853,"children":5854},{"style":711},[5855],{"type":45,"value":776},{"type":39,"tag":67,"props":5857,"children":5858},{"style":80},[5859],{"type":45,"value":213},{"type":39,"tag":67,"props":5861,"children":5862},{"style":711},[5863],{"type":45,"value":3792},{"type":39,"tag":67,"props":5865,"children":5866},{"style":80},[5867],{"type":45,"value":3335},{"type":39,"tag":67,"props":5869,"children":5870},{"style":141},[5871],{"type":45,"value":723},{"type":39,"tag":67,"props":5873,"children":5874},{"style":80},[5875],{"type":45,"value":433},{"type":39,"tag":67,"props":5877,"children":5879},{"class":69,"line":5878},68,[5880,5884,5888,5892,5896,5900,5904,5908,5912,5916,5920],{"type":39,"tag":67,"props":5881,"children":5882},{"style":74},[5883],{"type":45,"value":3813},{"type":39,"tag":67,"props":5885,"children":5886},{"style":176},[5887],{"type":45,"value":708},{"type":39,"tag":67,"props":5889,"children":5890},{"style":86},[5891],{"type":45,"value":3822},{"type":39,"tag":67,"props":5893,"children":5894},{"style":80},[5895],{"type":45,"value":3431},{"type":39,"tag":67,"props":5897,"children":5898},{"style":86},[5899],{"type":45,"value":3831},{"type":39,"tag":67,"props":5901,"children":5902},{"style":80},[5903],{"type":45,"value":3836},{"type":39,"tag":67,"props":5905,"children":5906},{"style":86},[5907],{"type":45,"value":776},{"type":39,"tag":67,"props":5909,"children":5910},{"style":80},[5911],{"type":45,"value":194},{"type":39,"tag":67,"props":5913,"children":5914},{"style":86},[5915],{"type":45,"value":3831},{"type":39,"tag":67,"props":5917,"children":5918},{"style":176},[5919],{"type":45,"value":3853},{"type":39,"tag":67,"props":5921,"children":5922},{"style":80},[5923],{"type":45,"value":169},{"type":39,"tag":67,"props":5925,"children":5927},{"class":69,"line":5926},69,[5928,5933,5937,5941,5945,5949,5954,5958,5962,5966,5970,5974,5978],{"type":39,"tag":67,"props":5929,"children":5930},{"style":86},[5931],{"type":45,"value":5932},"            console",{"type":39,"tag":67,"props":5934,"children":5935},{"style":80},[5936],{"type":45,"value":194},{"type":39,"tag":67,"props":5938,"children":5939},{"style":157},[5940],{"type":45,"value":5732},{"type":39,"tag":67,"props":5942,"children":5943},{"style":176},[5944],{"type":45,"value":164},{"type":39,"tag":67,"props":5946,"children":5947},{"style":80},[5948],{"type":45,"value":1660},{"type":39,"tag":67,"props":5950,"children":5951},{"style":107},[5952],{"type":45,"value":5953},"Email changed for user ",{"type":39,"tag":67,"props":5955,"children":5956},{"style":80},[5957],{"type":45,"value":1670},{"type":39,"tag":67,"props":5959,"children":5960},{"style":86},[5961],{"type":45,"value":5754},{"type":39,"tag":67,"props":5963,"children":5964},{"style":80},[5965],{"type":45,"value":194},{"type":39,"tag":67,"props":5967,"children":5968},{"style":86},[5969],{"type":45,"value":3689},{"type":39,"tag":67,"props":5971,"children":5972},{"style":80},[5973],{"type":45,"value":5767},{"type":39,"tag":67,"props":5975,"children":5976},{"style":176},[5977],{"type":45,"value":233},{"type":39,"tag":67,"props":5979,"children":5980},{"style":80},[5981],{"type":45,"value":119},{"type":39,"tag":67,"props":5983,"children":5985},{"class":69,"line":5984},70,[5986],{"type":39,"tag":67,"props":5987,"children":5988},{"style":80},[5989],{"type":45,"value":4007},{"type":39,"tag":67,"props":5991,"children":5993},{"class":69,"line":5992},71,[5994],{"type":39,"tag":67,"props":5995,"children":5996},{"style":80},[5997],{"type":45,"value":3567},{"type":39,"tag":67,"props":5999,"children":6001},{"class":69,"line":6000},72,[6002],{"type":39,"tag":67,"props":6003,"children":6004},{"style":80},[6005],{"type":45,"value":3576},{"type":39,"tag":67,"props":6007,"children":6009},{"class":69,"line":6008},73,[6010],{"type":39,"tag":67,"props":6011,"children":6012},{"style":80},[6013],{"type":45,"value":743},{"type":39,"tag":67,"props":6015,"children":6017},{"class":69,"line":6016},74,[6018],{"type":39,"tag":67,"props":6019,"children":6020},{"style":80},[6021],{"type":45,"value":524},{"type":39,"tag":67,"props":6023,"children":6025},{"class":69,"line":6024},75,[6026,6030,6034],{"type":39,"tag":67,"props":6027,"children":6028},{"style":80},[6029],{"type":45,"value":228},{"type":39,"tag":67,"props":6031,"children":6032},{"style":86},[6033],{"type":45,"value":233},{"type":39,"tag":67,"props":6035,"children":6036},{"style":80},[6037],{"type":45,"value":119},{"type":39,"tag":40,"props":6039,"children":6041},{"id":6040},"security-checklist",[6042],{"type":45,"value":6043},"Security Checklist",{"type":39,"tag":239,"props":6045,"children":6046},{},[6047],{"type":45,"value":6048},"Before deploying to production:",{"type":39,"tag":287,"props":6050,"children":6053},{"className":6051},[6052],"contains-task-list",[6054,6074,6096,6110,6124,6145,6160,6183,6197,6226],{"type":39,"tag":249,"props":6055,"children":6058},{"className":6056},[6057],"task-list-item",[6059,6064,6066,6072],{"type":39,"tag":6060,"props":6061,"children":6063},"input",{"disabled":126,"type":6062},"checkbox",[],{"type":45,"value":6065}," ",{"type":39,"tag":6067,"props":6068,"children":6069},"strong",{},[6070],{"type":45,"value":6071},"Secret",{"type":45,"value":6073},": Use a strong, unique secret (32+ characters, high entropy)",{"type":39,"tag":249,"props":6075,"children":6077},{"className":6076},[6057],[6078,6081,6082,6087,6089,6094],{"type":39,"tag":6060,"props":6079,"children":6080},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6083,"children":6084},{},[6085],{"type":45,"value":6086},"HTTPS",{"type":45,"value":6088},": Ensure ",{"type":39,"tag":63,"props":6090,"children":6092},{"className":6091},[],[6093],{"type":45,"value":1420},{"type":45,"value":6095}," uses HTTPS",{"type":39,"tag":249,"props":6097,"children":6099},{"className":6098},[6057],[6100,6103,6104,6108],{"type":39,"tag":6060,"props":6101,"children":6102},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6105,"children":6106},{},[6107],{"type":45,"value":1206},{"type":45,"value":6109},": Configure all valid origins (frontend, mobile apps)",{"type":39,"tag":249,"props":6111,"children":6113},{"className":6112},[6057],[6114,6117,6118,6122],{"type":39,"tag":6060,"props":6115,"children":6116},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6119,"children":6120},{},[6121],{"type":45,"value":321},{"type":45,"value":6123},": Keep enabled with appropriate limits",{"type":39,"tag":249,"props":6125,"children":6127},{"className":6126},[6057],[6128,6131,6132,6136,6138,6144],{"type":39,"tag":6060,"props":6129,"children":6130},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6133,"children":6134},{},[6135],{"type":45,"value":1036},{"type":45,"value":6137},": Keep enabled (",{"type":39,"tag":63,"props":6139,"children":6141},{"className":6140},[],[6142],{"type":45,"value":6143},"disableCSRFCheck: false",{"type":45,"value":233},{"type":39,"tag":249,"props":6146,"children":6148},{"className":6147},[6057],[6149,6152,6153,6158],{"type":39,"tag":6060,"props":6150,"children":6151},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6154,"children":6155},{},[6156],{"type":45,"value":6157},"Secure Cookies",{"type":45,"value":6159},": Enabled automatically with HTTPS",{"type":39,"tag":249,"props":6161,"children":6163},{"className":6162},[6057],[6164,6167,6168,6173,6175,6181],{"type":39,"tag":6060,"props":6165,"children":6166},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6169,"children":6170},{},[6171],{"type":45,"value":6172},"OAuth Tokens",{"type":45,"value":6174},": Consider ",{"type":39,"tag":63,"props":6176,"children":6178},{"className":6177},[],[6179],{"type":45,"value":6180},"encryptOAuthTokens: true",{"type":45,"value":6182}," if storing tokens",{"type":39,"tag":249,"props":6184,"children":6186},{"className":6185},[6057],[6187,6190,6191,6195],{"type":39,"tag":6060,"props":6188,"children":6189},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6192,"children":6193},{},[6194],{"type":45,"value":4285},{"type":45,"value":6196},": Configure for serverless platforms",{"type":39,"tag":249,"props":6198,"children":6200},{"className":6199},[6057],[6201,6204,6205,6210,6212,6218,6220],{"type":39,"tag":6060,"props":6202,"children":6203},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6206,"children":6207},{},[6208],{"type":45,"value":6209},"Audit Logging",{"type":45,"value":6211},": Implement via ",{"type":39,"tag":63,"props":6213,"children":6215},{"className":6214},[],[6216],{"type":45,"value":6217},"databaseHooks",{"type":45,"value":6219}," or ",{"type":39,"tag":63,"props":6221,"children":6223},{"className":6222},[],[6224],{"type":45,"value":6225},"hooks",{"type":39,"tag":249,"props":6227,"children":6229},{"className":6228},[6057],[6230,6233,6234,6239],{"type":39,"tag":6060,"props":6231,"children":6232},{"disabled":126,"type":6062},[],{"type":45,"value":6065},{"type":39,"tag":6067,"props":6235,"children":6236},{},[6237],{"type":45,"value":6238},"IP Tracking",{"type":45,"value":6240},": Configure headers if behind a proxy",{"type":39,"tag":6242,"props":6243,"children":6244},"style",{},[6245],{"type":45,"value":6246},"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":6248,"total":463},[6249,6264,6271,6284,6295,6310],{"slug":6250,"name":6250,"fn":6251,"description":6252,"org":6253,"tags":6254,"stars":23,"repoUrl":24,"updatedAt":6263},"better-auth-best-practices","configure Better Auth servers and clients","Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email\u002Fpassword, OAuth, or plugin configuration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6255,6256,6257,6260],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6258,"slug":6259,"type":15},"Sessions","sessions",{"name":6261,"slug":6262,"type":15},"TypeScript","typescript","2026-04-06T18:05:01.910941",{"slug":4,"name":4,"fn":5,"description":6,"org":6265,"tags":6266,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6267,6268,6269,6270],{"name":21,"slug":22,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":6272,"name":6272,"fn":6273,"description":6274,"org":6275,"tags":6276,"stars":23,"repoUrl":24,"updatedAt":6283},"create-auth","scaffold Better Auth in TypeScript apps","Scaffold and implement authentication in TypeScript\u002FJavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6277,6278,6279,6282],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6280,"slug":6281,"type":15},"OAuth","oauth",{"name":6261,"slug":6262,"type":15},"2026-04-06T18:04:59.364175",{"slug":6285,"name":6285,"fn":6286,"description":6287,"org":6288,"tags":6289,"stars":23,"repoUrl":24,"updatedAt":6294},"email-and-password-best-practices","configure Better Auth email and password flows","Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email\u002Fpassword authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6290,6291,6292],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6293,"slug":3831,"type":15},"Email","2026-04-06T18:05:03.185369",{"slug":6296,"name":6296,"fn":6297,"description":6298,"org":6299,"tags":6300,"stars":23,"repoUrl":24,"updatedAt":6309},"organization-best-practices","set up multi-tenant orgs in Better Auth","Configure multi-tenant organizations, manage members and invitations, define custom roles and permissions, set up teams, and implement RBAC using Better Auth's organization plugin. Use when users need org setup, team management, member roles, access control, or the Better Auth organization plugin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6301,6302,6303,6306],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6304,"slug":6305,"type":15},"Multi-Tenant","multi-tenant",{"name":6307,"slug":6308,"type":15},"RBAC","rbac","2026-04-06T18:05:00.636075",{"slug":6311,"name":6311,"fn":6312,"description":6313,"org":6314,"tags":6315,"stars":23,"repoUrl":24,"updatedAt":6324},"two-factor-authentication-best-practices","set up 2FA flows in Better Auth","Configure TOTP authenticator apps, send OTP codes via email\u002FSMS, manage backup codes, handle trusted devices, and implement 2FA sign-in flows using Better Auth's twoFactor plugin. Use when users need MFA, multi-factor authentication, authenticator setup, or login security with Better Auth.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6316,6319,6320,6321],{"name":6317,"slug":6318,"type":15},"2FA","two-factor-auth",{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6322,"slug":6323,"type":15},"MFA","mfa","2026-04-06T18:04:58.118682",{"items":6326,"total":463},[6327,6334,6341,6348,6354,6361],{"slug":6250,"name":6250,"fn":6251,"description":6252,"org":6328,"tags":6329,"stars":23,"repoUrl":24,"updatedAt":6263},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6330,6331,6332,6333],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6258,"slug":6259,"type":15},{"name":6261,"slug":6262,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":6335,"tags":6336,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6337,6338,6339,6340],{"name":21,"slug":22,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":6272,"name":6272,"fn":6273,"description":6274,"org":6342,"tags":6343,"stars":23,"repoUrl":24,"updatedAt":6283},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6344,6345,6346,6347],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6280,"slug":6281,"type":15},{"name":6261,"slug":6262,"type":15},{"slug":6285,"name":6285,"fn":6286,"description":6287,"org":6349,"tags":6350,"stars":23,"repoUrl":24,"updatedAt":6294},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6351,6352,6353],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6293,"slug":3831,"type":15},{"slug":6296,"name":6296,"fn":6297,"description":6298,"org":6355,"tags":6356,"stars":23,"repoUrl":24,"updatedAt":6309},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6357,6358,6359,6360],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6304,"slug":6305,"type":15},{"name":6307,"slug":6308,"type":15},{"slug":6311,"name":6311,"fn":6312,"description":6313,"org":6362,"tags":6363,"stars":23,"repoUrl":24,"updatedAt":6324},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6364,6365,6366,6367],{"name":6317,"slug":6318,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":6322,"slug":6323,"type":15}]