[{"data":1,"prerenderedAt":799},["ShallowReactive",2],{"navigation":3,"\u002Fsign-in\u002Fsecurity":178,"\u002Fsign-in\u002Fsecurity-surround":794},[4,23,78,95,123,143,158],{"title":5,"path":6,"stem":7,"children":8,"icon":22},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12,17],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-house",{"title":13,"path":14,"stem":15,"icon":16},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":18,"path":19,"stem":20,"icon":21},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F3.configuration","i-lucide-settings",false,{"title":24,"icon":22,"path":25,"stem":26,"children":27,"page":22},"Sign-in","\u002Fsign-in","2.sign-in",[28,33,38,43,48,53,58,63,68,73],{"title":29,"path":30,"stem":31,"icon":32},"Sign-in pages","\u002Fsign-in\u002Fpages","2.sign-in\u002F1.pages","i-lucide-log-in",{"title":34,"path":35,"stem":36,"icon":37},"Several accounts","\u002Fsign-in\u002Fmulti-session","2.sign-in\u002F10.multi-session","i-lucide-users-round",{"title":39,"path":40,"stem":41,"icon":42},"Account page","\u002Fsign-in\u002Faccount","2.sign-in\u002F2.account","i-lucide-circle-user",{"title":44,"path":45,"stem":46,"icon":47},"Other methods","\u002Fsign-in\u002Fmethods","2.sign-in\u002F3.methods","i-lucide-key-square",{"title":49,"path":50,"stem":51,"icon":52},"Sign-in providers","\u002Fsign-in\u002Fproviders","2.sign-in\u002F4.providers","i-lucide-share-2",{"title":54,"path":55,"stem":56,"icon":57},"Two-factor","\u002Fsign-in\u002Ftwo-factor","2.sign-in\u002F5.two-factor","i-lucide-shield-check",{"title":59,"path":60,"stem":61,"icon":62},"Passkeys","\u002Fsign-in\u002Fpasskeys","2.sign-in\u002F6.passkeys","i-lucide-fingerprint",{"title":64,"path":65,"stem":66,"icon":67},"Phone numbers","\u002Fsign-in\u002Fphone-numbers","2.sign-in\u002F7.phone-numbers","i-lucide-smartphone",{"title":69,"path":70,"stem":71,"icon":72},"Signing in devices","\u002Fsign-in\u002Fdevices","2.sign-in\u002F8.devices","i-lucide-tv",{"title":74,"path":75,"stem":76,"icon":77},"Security","\u002Fsign-in\u002Fsecurity","2.sign-in\u002F9.security","i-lucide-lock-keyhole",{"title":79,"path":80,"stem":81,"children":82,"icon":22},"Organizations","\u002Forganizations","3.organizations\u002F1.index",[83,85,90],{"title":79,"path":80,"stem":81,"icon":84},"i-lucide-building-2",{"title":86,"path":87,"stem":88,"icon":89},"Roles","\u002Forganizations\u002Froles","3.organizations\u002F2.roles","i-lucide-shield",{"title":91,"path":92,"stem":93,"icon":94},"Single sign-on","\u002Forganizations\u002Fsso","3.organizations\u002F3.sso","i-lucide-key-round",{"title":96,"path":97,"stem":98,"children":99,"icon":22},"Admin dashboard","\u002Fadmin","4.admin\u002F1.index",[100,103,108,113,118],{"title":101,"path":97,"stem":98,"icon":102},"Overview","i-lucide-layout-dashboard",{"title":104,"path":105,"stem":106,"icon":107},"Managing users","\u002Fadmin\u002Fusers","4.admin\u002F2.users","i-lucide-user-cog",{"title":109,"path":110,"stem":111,"icon":112},"Staff roles","\u002Fadmin\u002Froles","4.admin\u002F3.roles","i-lucide-shield-user",{"title":114,"path":115,"stem":116,"icon":117},"Audit log","\u002Fadmin\u002Faudit-log","4.admin\u002F4.audit-log","i-lucide-history",{"title":119,"path":120,"stem":121,"icon":122},"Your own pages","\u002Fadmin\u002Fextending","4.admin\u002F5.extending","i-lucide-layout-panel-left",{"title":124,"icon":22,"path":125,"stem":126,"children":127,"page":22},"Integrations","\u002Fintegrations","5.integrations",[128,133,138],{"title":129,"path":130,"stem":131,"icon":132},"Stripe","\u002Fintegrations\u002Fstripe","5.integrations\u002F1.stripe","i-simple-icons-stripe",{"title":134,"path":135,"stem":136,"icon":137},"API keys","\u002Fintegrations\u002Fapi-keys","5.integrations\u002F2.api-keys","i-lucide-key",{"title":139,"path":140,"stem":141,"icon":142},"Tokens","\u002Fintegrations\u002Ftokens","5.integrations\u002F3.tokens","i-lucide-ticket",{"title":144,"icon":22,"path":145,"stem":146,"children":147,"page":22},"Customization","\u002Fcustomization","6.customization",[148,153],{"title":149,"path":150,"stem":151,"icon":152},"Emails","\u002Fcustomization\u002Femails","6.customization\u002F1.emails","i-lucide-mail",{"title":154,"path":155,"stem":156,"icon":157},"Languages","\u002Fcustomization\u002Flanguages","6.customization\u002F2.languages","i-lucide-languages",{"title":159,"icon":22,"path":160,"stem":161,"children":162,"page":22},"Reference","\u002Freference","7.reference",[163,168,173],{"title":164,"path":165,"stem":166,"icon":167},"How it works","\u002Freference\u002Fhow-it-works","7.reference\u002F1.how-it-works","i-lucide-cog",{"title":169,"path":170,"stem":171,"icon":172},"API reference","\u002Freference\u002Fapi","7.reference\u002F2.api","i-lucide-braces",{"title":174,"path":175,"stem":176,"icon":177},"Contributing","\u002Freference\u002Fcontributing","7.reference\u002F3.contributing","i-lucide-git-pull-request",{"id":179,"title":74,"body":180,"description":787,"extension":788,"links":789,"meta":790,"navigation":791,"path":75,"seo":792,"stem":76,"__hash__":793},"docs\u002F2.sign-in\u002F9.security.md",{"type":181,"value":182,"toc":780},"minimark",[183,188,200,358,362,365,405,412,526,529,533,540,586,592,596,607,669,752,776],[184,185,187],"h2",{"id":186},"captcha","Captcha",[189,190,191,192,199],"p",{},"Bot protection with Better Auth's ",[193,194,198],"a",{"href":195,"rel":196},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fplugins\u002Fcaptcha",[197],"nofollow","Captcha plugin",": a Cloudflare\nTurnstile, hCaptcha or reCAPTCHA v2 widget on the forms it guards. Better Auth checks the answer on its server.",[201,202,204,209,329,333,352],"steps",{"level":203},"3",[205,206,208],"h3",{"id":207},"add-your-site-key","Add your site key",[210,211,217],"pre",{"className":212,"code":213,"filename":214,"language":215,"meta":216,"style":216},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  betterAuthUi: {\n    captcha: {\n      provider: 'cloudflare-turnstile', \u002F\u002F or 'hcaptcha', 'google-recaptcha'\n      siteKey: '0x4AAA…'\n    }\n  }\n})\n","nuxt.config.ts","ts","",[218,219,220,244,257,267,292,308,314,320],"code",{"__ignoreMap":216},[221,222,225,229,232,236,240],"span",{"class":223,"line":224},"line",1,[221,226,228],{"class":227},"s7zQu","export",[221,230,231],{"class":227}," default",[221,233,235],{"class":234},"s2Zo4"," defineNuxtConfig",[221,237,239],{"class":238},"sTEyZ","(",[221,241,243],{"class":242},"sMK4o","{\n",[221,245,247,251,254],{"class":223,"line":246},2,[221,248,250],{"class":249},"swJcz","  betterAuthUi",[221,252,253],{"class":242},":",[221,255,256],{"class":242}," {\n",[221,258,260,263,265],{"class":223,"line":259},3,[221,261,262],{"class":249},"    captcha",[221,264,253],{"class":242},[221,266,256],{"class":242},[221,268,270,273,275,278,282,285,288],{"class":223,"line":269},4,[221,271,272],{"class":249},"      provider",[221,274,253],{"class":242},[221,276,277],{"class":242}," '",[221,279,281],{"class":280},"sfazB","cloudflare-turnstile",[221,283,284],{"class":242},"'",[221,286,287],{"class":242},",",[221,289,291],{"class":290},"sHwdD"," \u002F\u002F or 'hcaptcha', 'google-recaptcha'\n",[221,293,295,298,300,302,305],{"class":223,"line":294},5,[221,296,297],{"class":249},"      siteKey",[221,299,253],{"class":242},[221,301,277],{"class":242},[221,303,304],{"class":280},"0x4AAA…",[221,306,307],{"class":242},"'\n",[221,309,311],{"class":223,"line":310},6,[221,312,313],{"class":242},"    }\n",[221,315,317],{"class":223,"line":316},7,[221,318,319],{"class":242},"  }\n",[221,321,323,326],{"class":223,"line":322},8,[221,324,325],{"class":242},"}",[221,327,328],{"class":238},")\n",[205,330,332],{"id":331},"set-the-secret-key-in-the-environment","Set the secret key in the environment",[210,334,339],{"className":335,"code":336,"filename":337,"language":338,"meta":216,"style":216},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","BETTER_AUTH_CAPTCHA_SECRET_KEY=0x4AAA…\n",".env","bash",[218,340,341],{"__ignoreMap":216},[221,342,343,346,349],{"class":223,"line":224},[221,344,345],{"class":238},"BETTER_AUTH_CAPTCHA_SECRET_KEY",[221,347,348],{"class":242},"=",[221,350,351],{"class":280},"0x4AAA…\n",[189,353,354,355,357],{},"It's read at runtime, never from ",[218,356,214],{},".",[205,359,361],{"id":360},"which-forms-it-guards","Which forms it guards",[189,363,364],{},"By default, the forms that can create an account or send something:",[366,367,368,376,387,396],"ul",{},[369,370,371,372,375],"li",{},"signing up (",[218,373,374],{},"\u002Fsign-up\u002Femail",");",[369,377,378,379,383,384,375],{},"asking for a ",[193,380,382],{"href":381},"\u002Fsign-in\u002Fmethods#sign-in-links","sign-in link"," (",[218,385,386],{},"\u002Fsign-in\u002Fmagic-link",[369,388,378,389,383,393,375],{},[193,390,392],{"href":391},"\u002Fsign-in\u002Fmethods#codes-by-email","code by email",[218,394,395],{},"\u002Femail-otp\u002Fsend-verification-otp",[369,397,378,398,383,401,404],{},[193,399,400],{"href":65},"code by text",[218,402,403],{},"\u002Fphone-number\u002Fsend-otp",").",[189,406,407,408,411],{},"Choose your own with ",[218,409,410],{},"endpoints",", for example to guard signing in and password resets as well:",[210,413,415],{"className":212,"code":414,"filename":214,"language":215,"meta":216,"style":216},"export default defineNuxtConfig({\n  betterAuthUi: {\n    captcha: {\n      provider: 'cloudflare-turnstile',\n      siteKey: '0x4AAA…',\n      endpoints: ['\u002Fsign-up\u002Femail', '\u002Fsign-in\u002Femail', '\u002Frequest-password-reset']\n    }\n  }\n})\n",[218,416,417,429,437,445,460,474,511,515,519],{"__ignoreMap":216},[221,418,419,421,423,425,427],{"class":223,"line":224},[221,420,228],{"class":227},[221,422,231],{"class":227},[221,424,235],{"class":234},[221,426,239],{"class":238},[221,428,243],{"class":242},[221,430,431,433,435],{"class":223,"line":246},[221,432,250],{"class":249},[221,434,253],{"class":242},[221,436,256],{"class":242},[221,438,439,441,443],{"class":223,"line":259},[221,440,262],{"class":249},[221,442,253],{"class":242},[221,444,256],{"class":242},[221,446,447,449,451,453,455,457],{"class":223,"line":269},[221,448,272],{"class":249},[221,450,253],{"class":242},[221,452,277],{"class":242},[221,454,281],{"class":280},[221,456,284],{"class":242},[221,458,459],{"class":242},",\n",[221,461,462,464,466,468,470,472],{"class":223,"line":294},[221,463,297],{"class":249},[221,465,253],{"class":242},[221,467,277],{"class":242},[221,469,304],{"class":280},[221,471,284],{"class":242},[221,473,459],{"class":242},[221,475,476,479,481,484,486,488,490,492,494,497,499,501,503,506,508],{"class":223,"line":310},[221,477,478],{"class":249},"      endpoints",[221,480,253],{"class":242},[221,482,483],{"class":238}," [",[221,485,284],{"class":242},[221,487,374],{"class":280},[221,489,284],{"class":242},[221,491,287],{"class":242},[221,493,277],{"class":242},[221,495,496],{"class":280},"\u002Fsign-in\u002Femail",[221,498,284],{"class":242},[221,500,287],{"class":242},[221,502,277],{"class":242},[221,504,505],{"class":280},"\u002Frequest-password-reset",[221,507,284],{"class":242},[221,509,510],{"class":238},"]\n",[221,512,513],{"class":223,"line":316},[221,514,313],{"class":242},[221,516,517],{"class":223,"line":322},[221,518,319],{"class":242},[221,520,522,524],{"class":223,"line":521},9,[221,523,325],{"class":242},[221,525,328],{"class":238},[189,527,528],{},"The widget is loaded in the browser only.",[184,530,532],{"id":531},"breached-passwords","Breached passwords",[189,534,535,536,539],{},"With ",[218,537,538],{},"haveIBeenPwned: true",", Better Auth's Have I Been Pwned plugin refuses passwords found in data breaches, at\nsign-up, password changes and resets. The forms say the password will be checked.",[210,541,543],{"className":212,"code":542,"filename":214,"language":215,"meta":216,"style":216},"export default defineNuxtConfig({\n  betterAuthUi: {\n    haveIBeenPwned: true\n  }\n})\n",[218,544,545,557,565,576,580],{"__ignoreMap":216},[221,546,547,549,551,553,555],{"class":223,"line":224},[221,548,228],{"class":227},[221,550,231],{"class":227},[221,552,235],{"class":234},[221,554,239],{"class":238},[221,556,243],{"class":242},[221,558,559,561,563],{"class":223,"line":246},[221,560,250],{"class":249},[221,562,253],{"class":242},[221,564,256],{"class":242},[221,566,567,570,572],{"class":223,"line":259},[221,568,569],{"class":249},"    haveIBeenPwned",[221,571,253],{"class":242},[221,573,575],{"class":574},"sfNiH"," true\n",[221,577,578],{"class":223,"line":269},[221,579,319],{"class":242},[221,581,582,584],{"class":223,"line":294},[221,583,325],{"class":242},[221,585,328],{"class":238},[587,588,589],"note",{},[189,590,591],{},"Only the first 5 characters of the password's SHA-1 hash leave your server.",[184,593,595],{"id":594},"security-alerts","Security alerts",[189,597,598,599,602,603,606],{},"Emails to an account's owner when something sensitive happens to it, each with a link to where they can act. They go\nthrough the module's ",[193,600,601],{"href":150},"emails",", so ",[218,604,605],{},"emails.send"," must be set.",[210,608,610],{"className":212,"code":609,"filename":214,"language":215,"meta":216,"style":216},"export default defineNuxtConfig({\n  betterAuthUi: {\n    \u002F\u002F All of them:\n    securityAlerts: true,\n    \u002F\u002F Or pick:\n    \u002F\u002F securityAlerts: { newSignIn: true, passwordChanged: true }\n  }\n})\n",[218,611,612,624,632,637,649,654,659,663],{"__ignoreMap":216},[221,613,614,616,618,620,622],{"class":223,"line":224},[221,615,228],{"class":227},[221,617,231],{"class":227},[221,619,235],{"class":234},[221,621,239],{"class":238},[221,623,243],{"class":242},[221,625,626,628,630],{"class":223,"line":246},[221,627,250],{"class":249},[221,629,253],{"class":242},[221,631,256],{"class":242},[221,633,634],{"class":223,"line":259},[221,635,636],{"class":290},"    \u002F\u002F All of them:\n",[221,638,639,642,644,647],{"class":223,"line":269},[221,640,641],{"class":249},"    securityAlerts",[221,643,253],{"class":242},[221,645,646],{"class":574}," true",[221,648,459],{"class":242},[221,650,651],{"class":223,"line":294},[221,652,653],{"class":290},"    \u002F\u002F Or pick:\n",[221,655,656],{"class":223,"line":310},[221,657,658],{"class":290},"    \u002F\u002F securityAlerts: { newSignIn: true, passwordChanged: true }\n",[221,660,661],{"class":223,"line":316},[221,662,319],{"class":242},[221,664,665,667],{"class":223,"line":322},[221,666,325],{"class":242},[221,668,328],{"class":238},[670,671,672,688],"table",{},[673,674,675],"thead",{},[676,677,678,682,685],"tr",{},[679,680,681],"th",{},"Alert",[679,683,684],{},"Template",[679,686,687],{},"Sent when",[689,690,691,707,722,737],"tbody",{},[676,692,693,699,704],{},[694,695,696],"td",{},[218,697,698],{},"newSignIn",[694,700,701],{},[218,702,703],{},"new-sign-in",[694,705,706],{},"Someone signs in from a browser and OS the account hasn't used before",[676,708,709,714,719],{},[694,710,711],{},[218,712,713],{},"passwordChanged",[694,715,716],{},[218,717,718],{},"password-changed",[694,720,721],{},"The password is changed, reset, set for the first time, or set by an admin",[676,723,724,729,734],{},[694,725,726],{},[218,727,728],{},"twoFactor",[694,730,731],{},[218,732,733],{},"two-factor-changed",[694,735,736],{},"Two-factor is turned on or off, including by an admin",[676,738,739,744,749],{},[694,740,741],{},[218,742,743],{},"passkeyAdded",[694,745,746],{},[218,747,748],{},"passkey-added",[694,750,751],{},"A passkey is added",[366,753,754,761,767,773],{},[369,755,756,760],{},[757,758,759],"strong",{},"\"A device the account hasn't used before\""," compares the browser and OS (\"Chrome on Windows\") with the account's\nother sessions and, with the audit log on, its last 100 sign-ins. It's a hint, not a fingerprint: a second Windows\nPC with Chrome counts as known.",[369,762,763,766],{},[757,764,765],{},"No alerts"," in an account's first two minutes (signing up signs in), when an admin impersonates someone, or to\nguests.",[369,768,769,772],{},[757,770,771],{},"With two-factor on",", the sign-in alert comes after the code, when the sign-in really completes.",[369,774,775],{},"Times are written in UTC, in the emails' language.",[777,778,779],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}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);}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":216,"searchDepth":224,"depth":246,"links":781},[782,785,786],{"id":186,"depth":246,"text":187,"children":783},[784],{"id":360,"depth":259,"text":361},{"id":531,"depth":246,"text":532},{"id":594,"depth":246,"text":595},"Captcha, breached-password checks, and emails about sensitive changes.","md",null,{},{"icon":77},{"title":74,"description":787},"4KDsdiyTHv3IUWthLvYUQXVjM1pj5SbJXadwXSmWLP8",[795,797],{"title":69,"path":70,"stem":71,"description":796,"icon":72,"children":-1},"Sign in TVs, consoles, CLIs and desktop apps with a code.",{"title":79,"path":80,"stem":81,"description":798,"icon":84,"children":-1},"Teams, workspaces or companies, with members, invitations and teams.",1793019844560]