[{"data":1,"prerenderedAt":756},["ShallowReactive",2],{"navigation":3,"\u002Fadmin":178,"\u002Fadmin-surround":751},[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":101,"body":180,"description":744,"extension":745,"links":746,"meta":747,"navigation":748,"path":97,"seo":749,"stem":98,"__hash__":750},"docs\u002F4.admin\u002F1.index.md",{"type":181,"value":182,"toc":729},"minimark",[183,188,204,209,216,219,235,238,242,255,271,351,355,359,367,370,376,379,386,392,396,407,410,416,420,424,427,434,438,556,649,653,662,703,725],[184,185],"screenshot",{"alt":186,"name":187},"The admin dashboard's home page: users, sign-ups, online now, active sessions and bans, with a sign-ups chart","admin-home",[189,190,191,192,195,196,203],"p",{},"The admin dashboard is on by default, at ",[193,194,97],"code",{},". Staff manage users there through Better Auth's\n",[197,198,202],"a",{"href":199,"rel":200},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fplugins\u002Fadmin",[201],"nofollow","Admin plugin",", which the module adds for you. Everything in it is backed\nby Better Auth: it checks every action's permission on its server.",[205,206,208],"h2",{"id":207},"getting-in","Getting in",[189,210,211,212,215],{},"Only signed-in staff can open it: users with the admin role, and ",[197,213,214],{"href":110},"roles"," that can list users. Others are\nsent to the sign-in page, or get a 403.",[189,217,218],{},"Nobody has the admin role at first. Give it to yourself once in the database:",[220,221,226],"pre",{"className":222,"code":223,"language":224,"meta":225,"style":225},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","update user set role = 'admin' where email = 'you@example.com';\n","sql","",[193,227,228],{"__ignoreMap":225},[229,230,233],"span",{"class":231,"line":232},"line",1,[229,234,223],{},[189,236,237],{},"After that, admins can give the role to others from the dashboard.",[205,239,241],{"id":240},"finding-your-way","Finding your way",[189,243,244,245,250,251,254],{},"The layout comes from the ",[197,246,249],{"href":247,"rel":248},"https:\u002F\u002Fgithub.com\u002Fnuxt-ui-templates\u002Fdashboard",[201],"Nuxt UI dashboard template",": a collapsible\nsidebar headed by your app's name (Better Auth's ",[193,252,253],{},"appName","), and a menu at its foot with your account, light, dark or\nsystem appearance, the way back to your site, and signing out.",[189,256,257,261,262,266,267,270],{},[258,259,260],"strong",{},"Search"," (",[263,264],"kbd",{"value":265},"meta"," ",[263,268],{"value":269},"K",") finds pages, actions such as \"Create a user\", and users by name or\nemail.",[272,273,274,287],"table",{},[275,276,277],"thead",{},[278,279,280,284],"tr",{},[281,282,283],"th",{},"Shortcut",[281,285,286],{},"Goes to",[288,289,290,305,317,329,340],"tbody",{},[278,291,292,302],{},[293,294,295,298,299],"td",{},[263,296],{"value":297},"G"," then ",[263,300],{"value":301},"H",[293,303,304],{},"Home",[278,306,307,314],{},[293,308,309,298,311],{},[263,310],{"value":297},[263,312],{"value":313},"U",[293,315,316],{},"Users",[278,318,319,326],{},[293,320,321,298,323],{},[263,322],{"value":297},[263,324],{"value":325},"S",[293,327,328],{},"Sessions",[278,330,331,338],{},[293,332,333,298,335],{},[263,334],{"value":297},[263,336],{"value":337},"A",[293,339,114],{},[278,341,342,349],{},[293,343,344,298,346],{},[263,345],{"value":297},[263,347],{"value":348},"C",[293,350,18],{},[205,352,354],{"id":353},"the-pages","The pages",[356,357,304],"h3",{"id":358},"home",[189,360,361,362,366],{},"Total users, sign-ups compared with the previous period, active sessions and bans; a sign-ups chart by day, week or\nmonth over a range you choose; and the newest users. With ",[197,363,365],{"href":364},"\u002Fadmin\u002Faudit-log#last-active-and-online-now","activity tracking",",\nan \"Online now\" card too.",[356,368,316],{"id":369},"users",[189,371,372,373,375],{},"Everyone, with search, filters and actions. See ",[197,374,104],{"href":105},".",[356,377,328],{"id":378},"sessions",[189,380,381,382,385],{},"Everyone signed in, most recently active first, with device, IP, when they signed in and when the session expires.\nSign any session out. It needs the ",[193,383,384],{},"session: list"," permission.",[387,388,389],"note",{},[189,390,391],{},"\"Last active\" here is when Better Auth last refreshed the session, which is at most daily by default. The page isn't\navailable when sessions live only in secondary storage such as Redis.",[356,393,395],{"id":394},"organizations-and-single-sign-on","Organizations and single sign-on",[189,397,398,399,402,403,406],{},"With ",[197,400,401],{"href":80},"organizations"," and ",[197,404,405],{"href":92},"single sign-on"," on, pages listing every organization and\nevery identity provider.",[356,408,114],{"id":409},"audit-log",[189,411,412,413,375],{},"Every admin action and, by default, users' own sign-ins. See ",[197,414,415],{"href":115},"Audit log and activity",[356,417,419],{"id":418},"configuration-page","Configuration page",[184,421],{"alt":422,"name":423},"The configuration page: signing in, security, and apps and integrations, each setting on or off","admin-configuration",[189,425,426],{},"How your app is set up, read-only: sign-in methods and providers, email verification and password rules, two-factor\n(and who must use it), passkeys, impersonation, email changes and deletion, which emails have your own template, the\naudit log, activity tracking and every integration.",[189,428,429,430,433],{},"It also has a ",[258,431,432],{},"roles and permissions"," table: every Better Auth Admin permission against every role, checked exactly\nas the server checks it, with the roles that can open the admin marked \"Staff\".",[205,435,437],{"id":436},"options","Options",[220,439,444],{"className":440,"code":441,"filename":442,"language":443,"meta":225,"style":225},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  betterAuthUi: {\n    admin: {\n      route: '\u002Fadmin',\n      impersonation: true,\n      notes: true\n    }\n  }\n})\n","nuxt.config.ts","ts",[193,445,446,467,480,490,510,524,535,541,547],{"__ignoreMap":225},[229,447,448,452,455,459,463],{"class":231,"line":232},[229,449,451],{"class":450},"s7zQu","export",[229,453,454],{"class":450}," default",[229,456,458],{"class":457},"s2Zo4"," defineNuxtConfig",[229,460,462],{"class":461},"sTEyZ","(",[229,464,466],{"class":465},"sMK4o","{\n",[229,468,470,474,477],{"class":231,"line":469},2,[229,471,473],{"class":472},"swJcz","  betterAuthUi",[229,475,476],{"class":465},":",[229,478,479],{"class":465}," {\n",[229,481,483,486,488],{"class":231,"line":482},3,[229,484,485],{"class":472},"    admin",[229,487,476],{"class":465},[229,489,479],{"class":465},[229,491,493,496,498,501,504,507],{"class":231,"line":492},4,[229,494,495],{"class":472},"      route",[229,497,476],{"class":465},[229,499,500],{"class":465}," '",[229,502,97],{"class":503},"sfazB",[229,505,506],{"class":465},"'",[229,508,509],{"class":465},",\n",[229,511,513,516,518,522],{"class":231,"line":512},5,[229,514,515],{"class":472},"      impersonation",[229,517,476],{"class":465},[229,519,521],{"class":520},"sfNiH"," true",[229,523,509],{"class":465},[229,525,527,530,532],{"class":231,"line":526},6,[229,528,529],{"class":472},"      notes",[229,531,476],{"class":465},[229,533,534],{"class":520}," true\n",[229,536,538],{"class":231,"line":537},7,[229,539,540],{"class":465},"    }\n",[229,542,544],{"class":231,"line":543},8,[229,545,546],{"class":465},"  }\n",[229,548,550,553],{"class":231,"line":549},9,[229,551,552],{"class":465},"}",[229,554,555],{"class":461},")\n",[557,558,559,568,576,583,592,603,613,621,633,639],"field-group",{},[560,561,565],"field",{"name":562,"type":563,"default":564},"enabled","boolean","true",[189,566,567],{},"The admin dashboard. Off, none of its pages, routes or Better Auth plugins are added.",[560,569,573],{"name":570,"type":571,"default":572},"route","string","'\u002Fadmin'",[189,574,575],{},"Where the admin pages live.",[560,577,580],{"name":578,"type":571,"default":579},"role","'admin'",[189,581,582],{},"The role that can do everything.",[560,584,587],{"name":214,"type":585,"default":586},"object","{}",[189,588,589,590,375],{},"More staff roles, with the permissions each has. See ",[197,591,109],{"href":110},[560,593,596],{"name":594,"type":563,"default":595},"impersonation","false",[189,597,598,599,375],{},"Let admins sign in as a user. See ",[197,600,602],{"href":601},"\u002Fadmin\u002Fusers#signing-in-as-a-user","Signing in as a user",[560,604,606],{"name":605,"type":563,"default":595},"notes",[189,607,608,609,375],{},"Private staff notes on each user's page. See ",[197,610,612],{"href":611},"\u002Fadmin\u002Fusers#staff-notes","Staff notes",[560,614,616],{"name":615,"type":563,"default":564},"auditLog",[189,617,618,619,375],{},"Record admin actions. See ",[197,620,415],{"href":115},[560,622,626],{"name":623,"type":624,"default":625},"auditLogRetentionDays","number","30",[189,627,628,629,632],{},"Days the audit log keeps entries. ",[193,630,631],{},"0"," keeps them forever.",[560,634,636],{"name":635,"type":563,"default":564},"auditUserEvents",[189,637,638],{},"Also record users' sign-ins, failed sign-ins, sign-outs and password changes.",[560,640,643],{"name":641,"type":585,"default":642},"activityTracking","{ enabled: false }",[189,644,645,646,375],{},"\"Last active\" and \"Online now\". ",[193,647,648],{},"{ enabled: true, updateInterval: 300000 }",[356,650,652],{"id":651},"better-auth-admin-plugin-options","Better Auth Admin plugin options",[189,654,655,656,661],{},"Passed through to Better Auth as ",[197,657,660],{"href":658,"rel":659},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fplugins\u002Fadmin#options",[201],"documented",". All optional.",[557,663,664,677,684,690,696],{},[560,665,668],{"name":666,"type":571,"default":667},"defaultRole","'user'",[189,669,670,671,674,675,375],{},"The role new users get: ",[193,672,673],{},"user",", the admin role, or one of ",[193,676,214],{},[560,678,681],{"name":679,"type":571,"default":680},"defaultBanReason","'No reason'",[189,682,683],{},"The ban reason when an admin gives none.",[560,685,687],{"name":686,"type":624},"defaultBanExpiresIn",[189,688,689],{},"Seconds a ban lasts when an admin gives no length. Forever by default.",[560,691,693],{"name":692,"type":571},"bannedUserMessage",[189,694,695],{},"What banned users see when they try to sign in.",[560,697,700],{"name":698,"type":624,"default":699},"impersonationSessionDuration","3600",[189,701,702],{},"Seconds an impersonation session lasts.",[387,704,705],{},[189,706,707,708,710,711,710,714,402,717,720,721,724],{},"The Admin plugin adds ",[193,709,578],{},", ",[193,712,713],{},"banned",[193,715,716],{},"banReason",[193,718,719],{},"banExpires"," to the user table, and ",[193,722,723],{},"impersonatedBy"," to\nsessions: run Better Auth's migrations after installing.",[726,727,728],"style",{},"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 .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":225,"searchDepth":232,"depth":469,"links":730},[731,732,733,741],{"id":207,"depth":469,"text":208},{"id":240,"depth":469,"text":241},{"id":353,"depth":469,"text":354,"children":734},[735,736,737,738,739,740],{"id":358,"depth":482,"text":304},{"id":369,"depth":482,"text":316},{"id":378,"depth":482,"text":328},{"id":394,"depth":482,"text":395},{"id":409,"depth":482,"text":114},{"id":418,"depth":482,"text":419},{"id":436,"depth":469,"text":437,"children":742},[743],{"id":651,"depth":482,"text":652},"The admin dashboard at \u002Fadmin, where staff manage users through Better Auth's Admin plugin.","md",null,{},{"icon":102},{"title":101,"description":744},"X3_1DedSr1LAyc6G99e3Piojd1FplFTcl9sMKV7fsdo",[752,754],{"title":91,"path":92,"stem":93,"description":753,"icon":94,"children":-1},"Organizations sign their members in through their own identity provider, with OIDC or SAML 2.0.",{"title":104,"path":105,"stem":106,"description":755,"icon":107,"children":-1},"Find, add, edit, ban and delete users, and help them when they're locked out.",1793019844069]