[{"data":1,"prerenderedAt":630},["ShallowReactive",2],{"navigation":3,"\u002Fsign-in\u002Faccount":178,"\u002Fsign-in\u002Faccount-surround":625},[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":39,"body":180,"description":618,"extension":619,"links":620,"meta":621,"navigation":622,"path":40,"seo":623,"stem":41,"__hash__":624},"docs\u002F2.sign-in\u002F2.account.md",{"type":181,"value":182,"toc":612},"minimark",[183,188,214,219,222,229,400,403,407,416,420,427,446,449,455,459,466,608],[184,185],"screenshot",{"alt":186,"name":187},"The account page: the overview card with email, two-factor, passkeys, sign-in methods and devices, then the tabs","account",[189,190,191,195,196,203,204,209,210,213],"p",{},[192,193,194],"code",{},"\u002Faccount"," is for signed-in users. It's in your app's layout and uses Better Auth's own user and session APIs\n(",[197,198,202],"a",{"href":199,"rel":200},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fconcepts\u002Fusers-accounts",[201],"nofollow","User & Accounts",",\n",[197,205,208],{"href":206,"rel":207},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fconcepts\u002Fsession-management",[201],"Session Management","). Move it or turn it off with\n",[192,211,212],{},"pages.account",".",[215,216,218],"h2",{"id":217},"whats-on-it","What's on it",[189,220,221],{},"An overview card sits on top: avatar, name, email, role, \"member since\", and a tile for each part of the account's\nsecurity (email, two-factor, passkeys, sign-in methods, devices) that opens where it's managed.",[189,223,224,225,228],{},"Below it, the sections are in tabs. The open tab is in the URL (",[192,226,227],{},"\u002Faccount?tab=security","), so a tab can be linked to\nand survives a reload.",[230,231,232,248],"table",{},[233,234,235],"thead",{},[236,237,238,242,245],"tr",{},[239,240,241],"th",{},"Section",[239,243,244],{},"What people can do",[239,246,247],{},"Needs",[249,250,251,262,276,287,298,309,321,333,343,354,366,377,387],"tbody",{},[236,252,253,257,260],{},[254,255,256],"td",{},"Profile",[254,258,259],{},"Change their name and avatar",[254,261],{},[236,263,264,267,270],{},[254,265,266],{},"Email",[254,268,269],{},"Resend the verification link; change their email",[254,271,272,275],{},[192,273,274],{},"user.changeEmail.enabled"," to change it",[236,277,278,281,284],{},[254,279,280],{},"Password",[254,282,283],{},"Change it, optionally signing out other devices; accounts without one get a link to set one",[254,285,286],{},"Email and password sign-in",[236,288,289,291,294],{},[254,290,59],{},[254,292,293],{},"Add, rename and remove passkeys",[254,295,296],{},[197,297,59],{"href":60},[236,299,300,302,305],{},[254,301,54],{},[254,303,304],{},"Set up an authenticator app or email codes; new backup codes; turn it off",[254,306,307],{},[197,308,54],{"href":55},[236,310,311,314,317],{},[254,312,313],{},"Sign-in methods",[254,315,316],{},"Connect another provider; disconnect one (never the last)",[254,318,319],{},[197,320,49],{"href":50},[236,322,323,326,329],{},[254,324,325],{},"Phone number",[254,327,328],{},"Add, change or remove a number",[254,330,331],{},[197,332,64],{"href":65},[236,334,335,338,341],{},[254,336,337],{},"Devices",[254,339,340],{},"See where they're signed in; sign out of one or all others",[254,342],{},[236,344,345,347,350],{},[254,346,79],{},[254,348,349],{},"Their organizations, invitations, and creating one",[254,351,352],{},[197,353,79],{"href":80},[236,355,356,359,362],{},[254,357,358],{},"Billing",[254,360,361],{},"Their plan, and changing it",[254,363,364],{},[197,365,129],{"href":130},[236,367,368,370,373],{},[254,369,134],{},[254,371,372],{},"Create and revoke keys",[254,374,375],{},[197,376,134],{"href":135},[236,378,379,382,385],{},[254,380,381],{},"Your data",[254,383,384],{},"Download what the auth keeps about them",[254,386],{},[236,388,389,392,395],{},[254,390,391],{},"Delete account",[254,393,394],{},"With their password, a recent sign-in, or an email confirmation",[254,396,397],{},[192,398,399],{},"user.deleteUser.enabled",[189,401,402],{},"Sections your Better Auth set-up doesn't support are left out.",[215,404,406],{"id":405},"changing-email","Changing email",[189,408,409,410,412,413,415],{},"When the current email is verified, the change is approved from the old address first, then verified at the new one.\nThat needs ",[192,411,274],{}," and its confirmation email, both in your Better Auth config. See\n",[197,414,149],{"href":150}," for sending them.",[215,417,419],{"id":418},"downloading-their-data","Downloading their data",[189,421,422,423,426],{},"\"Download my data\" (GDPR's right of access) gives an ",[192,424,425],{},"account-data.json"," file with:",[428,429,430,434,437,440],"ul",{},[431,432,433],"li",{},"their user record, with your app's own user fields;",[431,435,436],{},"their sign-in methods, sessions, passkeys and API keys;",[431,438,439],{},"whether two-factor is on, and when they were last active;",[431,441,442,443,213],{},"their history from the ",[197,444,445],{"href":115},"audit log",[189,447,448],{},"It never includes secrets: no password hashes, tokens, two-factor secrets, backup codes, passkey keys or the API keys\nthemselves.\nHistory entries made by an admin say \"an admin\", without the admin's name, email, IP or browser.",[450,451,452],"note",{},[189,453,454],{},"The file covers the auth's tables only. Your app's own data about them is yours to add.",[215,456,458],{"id":457},"deleting-the-account","Deleting the account",[189,460,461,462,465],{},"People confirm with their password, a recent sign-in, or (with ",[192,463,464],{},"user.deleteUser.sendDeleteAccountVerification",") a\nlink by email. Turn deletion on in your Better Auth config:",[467,468,474],"pre",{"className":469,"code":470,"filename":471,"language":472,"meta":473,"style":473},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { betterAuthEmails } from '@treygrr\u002Fnuxt-better-auth-ui\u002Femails'\n\nexport default defineServerAuth({\n  user: {\n    deleteUser: {\n      enabled: true,\n      sendDeleteAccountVerification: betterAuthEmails.deleteAccount\n    }\n  }\n})\n","server\u002Fauth.config.ts","ts","",[192,475,476,509,516,535,548,558,572,587,593,599],{"__ignoreMap":473},[477,478,481,485,489,493,496,499,502,506],"span",{"class":479,"line":480},"line",1,[477,482,484],{"class":483},"s7zQu","import",[477,486,488],{"class":487},"sMK4o"," {",[477,490,492],{"class":491},"sTEyZ"," betterAuthEmails",[477,494,495],{"class":487}," }",[477,497,498],{"class":483}," from",[477,500,501],{"class":487}," '",[477,503,505],{"class":504},"sfazB","@treygrr\u002Fnuxt-better-auth-ui\u002Femails",[477,507,508],{"class":487},"'\n",[477,510,512],{"class":479,"line":511},2,[477,513,515],{"emptyLinePlaceholder":514},true,"\n",[477,517,519,522,525,529,532],{"class":479,"line":518},3,[477,520,521],{"class":483},"export",[477,523,524],{"class":483}," default",[477,526,528],{"class":527},"s2Zo4"," defineServerAuth",[477,530,531],{"class":491},"(",[477,533,534],{"class":487},"{\n",[477,536,538,542,545],{"class":479,"line":537},4,[477,539,541],{"class":540},"swJcz","  user",[477,543,544],{"class":487},":",[477,546,547],{"class":487}," {\n",[477,549,551,554,556],{"class":479,"line":550},5,[477,552,553],{"class":540},"    deleteUser",[477,555,544],{"class":487},[477,557,547],{"class":487},[477,559,561,564,566,570],{"class":479,"line":560},6,[477,562,563],{"class":540},"      enabled",[477,565,544],{"class":487},[477,567,569],{"class":568},"sfNiH"," true",[477,571,203],{"class":487},[477,573,575,578,580,582,584],{"class":479,"line":574},7,[477,576,577],{"class":540},"      sendDeleteAccountVerification",[477,579,544],{"class":487},[477,581,492],{"class":491},[477,583,213],{"class":487},[477,585,586],{"class":491},"deleteAccount\n",[477,588,590],{"class":479,"line":589},8,[477,591,592],{"class":487},"    }\n",[477,594,596],{"class":479,"line":595},9,[477,597,598],{"class":487},"  }\n",[477,600,602,605],{"class":479,"line":601},10,[477,603,604],{"class":487},"}",[477,606,607],{"class":491},")\n",[609,610,611],"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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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);}",{"title":473,"searchDepth":480,"depth":511,"links":613},[614,615,616,617],{"id":217,"depth":511,"text":218},{"id":405,"depth":511,"text":406},{"id":418,"depth":511,"text":419},{"id":457,"depth":511,"text":458},"Where people manage their own profile, security, devices and data.","md",null,{},{"icon":42},{"title":39,"description":618},"vqlPB7wsbYlwdqftuX2666S5g4nc6zRhdQMAVSQlYhc",[626,628],{"title":34,"path":35,"stem":36,"description":627,"icon":37,"children":-1},"Sign in to more than one account in the same browser, and switch between them.",{"title":44,"path":45,"stem":46,"description":629,"icon":47,"children":-1},"Usernames, sign-in links, codes by email, and guest accounts.",1793019842936]