[{"data":1,"prerenderedAt":3434},["ShallowReactive",2],{"navigation_docs":3,"-api-composables":216,"-api-composables-surround":3429},[4,42,68,115,136,157],{"title":5,"path":6,"stem":7,"children":8,"icon":11},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[9,12,17,22,27,32,37],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-sparkles",{"title":13,"path":14,"stem":15,"icon":16},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":18,"path":19,"stem":20,"icon":21},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":23,"path":24,"stem":25,"icon":26},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":28,"path":29,"stem":30,"icon":31},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":33,"path":34,"stem":35,"icon":36},"Schema Generation (NuxtHub)","\u002Fgetting-started\u002Fschema-generation","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":38,"path":39,"stem":40,"icon":41},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":43,"path":44,"stem":45,"children":46,"page":67},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[47,51,55,59,63],{"title":48,"path":49,"stem":50},"serverAuth()","\u002Fcore-concepts\u002Fserver-auth","2.core-concepts\u002F1.server-auth",{"title":52,"path":53,"stem":54},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":56,"path":57,"stem":58},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":60,"path":61,"stem":62},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":64,"path":65,"stem":66},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":69,"path":70,"stem":71,"children":72,"page":67},"Guides","\u002Fguides","3.guides",[73,77,82,86,90,94,99,103,107,111],{"title":74,"path":75,"stem":76},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":78,"path":79,"stem":80,"icon":81},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":83,"path":84,"stem":85},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":87,"path":88,"stem":89},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":91,"path":92,"stem":93},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":95,"path":96,"stem":97,"icon":98},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":100,"path":101,"stem":102},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":104,"path":105,"stem":106},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":108,"path":109,"stem":110},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":112,"path":113,"stem":114},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":116,"path":117,"stem":118,"children":119,"page":67},"Integrations","\u002Fintegrations","4.integrations",[120,124,128,132],{"title":121,"path":122,"stem":123},"NuxtHub","\u002Fintegrations\u002Fnuxthub","4.integrations\u002F1.nuxthub",{"title":125,"path":126,"stem":127},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":129,"path":130,"stem":131},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":133,"path":134,"stem":135},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":137,"path":138,"stem":139,"children":140,"page":67},"API Reference","\u002Fapi","5.api",[141,145,149,153],{"title":142,"path":143,"stem":144},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":146,"path":147,"stem":148},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":150,"path":151,"stem":152},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":154,"path":155,"stem":156},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types",{"title":158,"path":159,"stem":160,"children":161,"icon":81},"Errors","\u002Ferrors","6.errors\u002F0.index",[162,164,168,172,176,180,184,188,192,196,200,204,208,212],{"title":163,"path":159,"stem":160},"Overview",{"title":165,"path":166,"stem":167},"Better Auth CLI is not installed","\u002Ferrors\u002Fnuxt-auth-cli-missing","6.errors\u002Fnuxt-auth-cli-missing",{"title":169,"path":170,"stem":171},"Better Auth CLI version does not match better-auth","\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":173,"path":174,"stem":175},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed",{"title":177,"path":178,"stem":179},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema","6.errors\u002Fnuxt-auth-empty-schema",{"title":181,"path":182,"stem":183},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export",{"title":185,"path":186,"stem":187},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":189,"path":190,"stem":191},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config",{"title":193,"path":194,"stem":195},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":197,"path":198,"stem":199},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider",{"title":201,"path":202,"stem":203},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":205,"path":206,"stem":207},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":209,"path":210,"stem":211},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only",{"title":213,"path":214,"stem":215},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",{"id":217,"title":142,"body":218,"description":3423,"extension":3424,"links":3425,"meta":3426,"navigation":380,"path":143,"seo":3427,"stem":144,"__hash__":3428},"docs\u002F5.api\u002F1.composables.md",{"type":219,"value":220,"toc":3397},"minimark",[221,225,229,241,274,279,286,444,448,537,541,544,582,611,664,668,674,679,709,712,748,761,767,819,829,949,952,959,997,1001,1009,1120,1129,1133,1142,1165,1199,1207,1212,1215,1229,1242,1247,1286,1292,1300,1319,1330,1336,1339,1353,1357,1400,1405,1408,1433,1456,1462,1476,1480,1484,1487,1504,1514,1630,1640,1708,1711,1715,1718,1784,1791,1794,1819,1881,1885,1888,2059,2069,2095,2099,2109,2209,2215,2219,2225,2343,2346,2397,2400,2410,2596,2603,2635,2650,2665,2668,2788,2791,2811,2821,2825,2841,2855,2861,3012,3015,3024,3152,3168,3171,3175,3186,3333,3343,3363,3373,3377,3393],[222,223,224],"p",{},"Use this page when you need exact behavior for the client-side composables exposed by the module.",[226,227,228],"note",{},"These composables are auto-imported in Vue files. No import statement is needed in pages, components, plugins, middleware, or stores inside your Nuxt app.",[222,230,231,232,236,237,240],{},"Only the public composables exported by ",[233,234,235],"code",{},"@nuxtjs\u002Fbetter-auth\u002Fcomposables"," are registered as auto-imports. The deprecated ",[233,238,239],{},"useUserSessionState"," alias remains available.",[222,242,243,244,247,248,247,251,254,255,258,259,262,263,266,267,270,271,273],{},"Internal helpers ",[233,245,246],{},"getAuthRuntimeFlags",", ",[233,249,250],{},"useRawAuthClient",[233,252,253],{},"useAuthActionNamespaces",", and ",[233,256,257],{},"matchesUser"," are no longer auto-imported. Use ",[233,260,261],{},"useAuthClient"," for the configured client and ",[233,264,265],{},"useSignIn"," or ",[233,268,269],{},"useSignUp"," for authentication actions. Applications that used ",[233,272,257],{}," should keep their matching logic in application code.",[275,276,278],"h2",{"id":277},"quick-start","Quick Start",[222,280,281,282,285],{},"Use ",[233,283,284],{},"useUserSession()"," in pages and components to access the current session and session lifecycle actions.",[287,288,294],"pre",{"className":289,"code":290,"filename":291,"language":292,"meta":293,"style":293},"language-vue shiki shiki-themes one-light synthwave-84 synthwave-84","\u003Cscript setup lang=\"ts\">\nconst { user, loggedIn, signOut } = useUserSession()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cbutton v-if=\"loggedIn\" @click=\"signOut()\">\n    Sign out {{ user?.email }}\n  \u003C\u002Fbutton>\n\u003C\u002Ftemplate>\n","pages\u002Fapp.vue","vue","",[233,295,296,327,365,375,382,392,419,425,435],{"__ignoreMap":293},[297,298,301,305,309,313,316,320,324],"span",{"class":299,"line":300},"line",1,[297,302,304],{"class":303},"sL9le","\u003C",[297,306,308],{"class":307},"stweg","script",[297,310,312],{"class":311},"s0frj"," setup",[297,314,315],{"class":311}," lang",[297,317,319],{"class":318},"sNM9w","=",[297,321,323],{"class":322},"sPAZv","\"ts\"",[297,325,326],{"class":303},">\n",[297,328,330,334,338,342,344,347,349,352,355,358,362],{"class":299,"line":329},2,[297,331,333],{"class":332},"sqe1H","const",[297,335,337],{"class":336},"sEEOt"," { ",[297,339,341],{"class":340},"s6Rhl","user",[297,343,247],{"class":336},[297,345,346],{"class":340},"loggedIn",[297,348,247],{"class":336},[297,350,351],{"class":340},"signOut",[297,353,354],{"class":336}," } ",[297,356,319],{"class":357},"sQBpM",[297,359,361],{"class":360},"sfT9l"," useUserSession",[297,363,364],{"class":336},"()\n",[297,366,368,371,373],{"class":299,"line":367},3,[297,369,370],{"class":303},"\u003C\u002F",[297,372,308],{"class":307},[297,374,326],{"class":303},[297,376,378],{"class":299,"line":377},4,[297,379,381],{"emptyLinePlaceholder":380},true,"\n",[297,383,385,387,390],{"class":299,"line":384},5,[297,386,304],{"class":303},[297,388,389],{"class":307},"template",[297,391,326],{"class":303},[297,393,395,398,401,404,406,409,412,414,417],{"class":299,"line":394},6,[297,396,397],{"class":303},"  \u003C",[297,399,400],{"class":307},"button",[297,402,403],{"class":311}," v-if",[297,405,319],{"class":318},[297,407,408],{"class":322},"\"loggedIn\"",[297,410,411],{"class":311}," @click",[297,413,319],{"class":318},[297,415,416],{"class":322},"\"signOut()\"",[297,418,326],{"class":303},[297,420,422],{"class":299,"line":421},7,[297,423,424],{"class":336},"    Sign out {{ user?.email }}\n",[297,426,428,431,433],{"class":299,"line":427},8,[297,429,430],{"class":303},"  \u003C\u002F",[297,432,400],{"class":307},[297,434,326],{"class":303},[297,436,438,440,442],{"class":299,"line":437},9,[297,439,370],{"class":303},[297,441,389],{"class":307},[297,443,326],{"class":303},[275,445,447],{"id":446},"choosing-an-api","Choosing an API",[449,450,451,464],"table",{},[452,453,454],"thead",{},[455,456,457,461],"tr",{},[458,459,460],"th",{},"Use case",[458,462,463],{},"Composable",[465,466,467,477,487,497,507,517,527],"tbody",{},[455,468,469,473],{},[470,471,472],"td",{},"Pages, components, and setup stores that need auth state and session lifecycle actions",[470,474,475],{},[233,476,284],{},[455,478,479,482],{},[470,480,481],{},"Direct Better Auth client access",[470,483,484],{},[233,485,486],{},"useAuthClient()",[455,488,489,492],{},[470,490,491],{},"Sign-in forms that need loading, error, and success state",[470,493,494],{},[233,495,496],{},"useSignIn()",[455,498,499,502],{},[470,500,501],{},"Sign-up forms that need loading, error, and success state",[470,503,504],{},[233,505,506],{},"useSignUp()",[455,508,509,512],{},[470,510,511],{},"Sign-out buttons that need loading, error, and success state",[470,513,514],{},[233,515,516],{},"useSignOut()",[455,518,519,522],{},[470,520,521],{},"Better Auth plugin\u002Fclient methods that need loading, error, and success state",[470,523,524],{},[233,525,526],{},"useAuthClientAction()",[455,528,529,532],{},[470,530,531],{},"Custom auth endpoints that create or change the current session",[470,533,534],{},[233,535,536],{},"runWithSessionRefresh()",[275,538,540],{"id":539},"useusersession","useUserSession",[222,542,543],{},"The primary composable for accessing authentication state. It is safe to return directly from Pinia setup stores because it only exposes session state and session lifecycle actions.",[287,545,550],{"className":546,"code":547,"filename":548,"language":549,"meta":293,"style":293},"language-ts shiki shiki-themes one-light synthwave-84 synthwave-84","const { loggedIn, user, session, signOut } = useUserSession()\n","pages\u002Flogin.vue","ts",[233,551,552],{"__ignoreMap":293},[297,553,554,556,559,561,563,565,567,570,572,574,576,578,580],{"class":299,"line":300},[297,555,333],{"class":332},[297,557,337],{"class":558},"s17Py",[297,560,346],{"class":340},[297,562,247],{"class":558},[297,564,341],{"class":340},[297,566,247],{"class":558},[297,568,569],{"class":340},"session",[297,571,247],{"class":558},[297,573,351],{"class":340},[297,575,354],{"class":558},[297,577,319],{"class":357},[297,579,361],{"class":360},[297,581,364],{"class":558},[583,584,585,593,597,601,607],"field-group",{},[586,587,589,592],"field",{"name":346,"type":588},"ComputedRef\u003Cboolean>",[233,590,591],{},"true"," if the user is currently authenticated.",[586,594,596],{"name":341,"type":595},"Ref\u003CAuthUser | null>","The current user object, inferred from your config.",[586,598,600],{"name":569,"type":599},"Ref\u003CClientAuthSession | null>","The current session object.",[586,602,604,606],{"name":603,"type":588},"ready",[233,605,591],{}," when initial session resolution is complete (from SSR hydration or client fetch).",[586,608,610],{"name":351,"type":609},"(options?: SignOutOptions) => Promise\u003Cvoid>","Signs out and clears local session state.",[226,612,613,616],{},[222,614,615],{},"For SSR-safe auth access:",[617,618,619,637,646],"ul",{},[620,621,281,622,247,624,247,626,247,628,254,630,633,634,636],"li",{},[233,623,341],{},[233,625,569],{},[233,627,346],{},[233,629,603],{},[233,631,632],{},"fetchSession"," from ",[233,635,284],{},".",[620,638,281,639,266,642,645],{},[233,640,641],{},"useAuthRequestFetch()",[233,643,644],{},"useAuthAsyncData()"," for auth-bound data in pages.",[620,647,648,649,247,652,655,656,659,660,663],{},"Use server helpers like ",[233,650,651],{},"serverAuth(event)",[233,653,654],{},"getUserSession(event)",", or ",[233,657,658],{},"requireUserSession(event)"," in ",[233,661,662],{},"server\u002F"," handlers.",[275,665,667],{"id":666},"pinia-setup-stores","Pinia setup stores",[222,669,670,671,673],{},"Return ",[233,672,284],{}," directly when you want auth state in a Pinia setup store or another shared state container.",[675,676,678],"h3",{"id":677},"client-session-type","Client session type",[222,680,681,684,685,688,689,633,692,695,696,698,699,701,702,705,706,708],{},[233,682,683],{},"useUserSession().session"," uses ",[233,686,687],{},"ClientAuthSession",", which omits ",[233,690,691],{},"token",[233,693,694],{},"AuthSession",". The module already removes the token from client state. Update explicit client-side ",[233,697,694],{}," annotations to ",[233,700,687],{}," imported from ",[233,703,704],{},"#nuxt-better-auth",". Server helpers continue to return the full ",[233,707,694],{},", including its token.",[222,710,711],{},"It returns:",[617,713,714,718,722,726,730,734,739,743],{},[620,715,716],{},[233,717,341],{},[620,719,720],{},[233,721,569],{},[620,723,724],{},[233,725,346],{},[620,727,728],{},[233,729,603],{},[620,731,732],{},[233,733,632],{},[620,735,736],{},[233,737,738],{},"waitForSession",[620,740,741],{},[233,742,351],{},[620,744,745],{},[233,746,747],{},"updateUser",[222,749,750,751,247,754,655,757,760],{},"It does not return ",[233,752,753],{},"client",[233,755,756],{},"signIn",[233,758,759],{},"signUp",". Those values are runtime Better Auth client namespaces, not auth state. Keep them in components or action composables instead of storing them in hydrated state.",[222,762,763,766],{},[233,764,765],{},"useUserSessionState()"," remains as a deprecated alias for the same store-safe shape.",[287,768,771],{"className":546,"code":769,"filename":770,"language":549,"meta":293,"style":293},"export const useUserStore = defineStore('user', () => {\n  return useUserSession()\n})\n","app\u002Fstores\u002Fuser.ts",[233,772,773,805,814],{"__ignoreMap":293},[297,774,775,778,781,784,787,790,793,796,799,802],{"class":299,"line":300},[297,776,777],{"class":332},"export",[297,779,780],{"class":332}," const",[297,782,783],{"class":340}," useUserStore",[297,785,786],{"class":357}," =",[297,788,789],{"class":360}," defineStore",[297,791,792],{"class":558},"(",[297,794,795],{"class":322},"'user'",[297,797,798],{"class":558},", () ",[297,800,801],{"class":332},"=>",[297,803,804],{"class":558}," {\n",[297,806,807,810,812],{"class":299,"line":329},[297,808,809],{"class":332},"  return",[297,811,361],{"class":360},[297,813,364],{"class":558},[297,815,816],{"class":299,"line":367},[297,817,818],{"class":558},"})\n",[222,820,821,822,247,824,655,826,828],{},"Keep sign-in and sign-up flows in components. Use ",[233,823,496],{},[233,825,506],{},[233,827,526],{}," when the UI needs loading, error, and success state:",[287,830,832],{"className":289,"code":831,"filename":548,"language":292,"meta":293,"style":293},"\u003Cscript setup lang=\"ts\">\nconst signInEmail = useSignIn('email')\n\nasync function submit(email: string, password: string) {\n  await signInEmail.execute({ email, password })\n}\n\u003C\u002Fscript>\n",[233,833,834,850,870,874,911,936,941],{"__ignoreMap":293},[297,835,836,838,840,842,844,846,848],{"class":299,"line":300},[297,837,304],{"class":303},[297,839,308],{"class":307},[297,841,312],{"class":311},[297,843,315],{"class":311},[297,845,319],{"class":318},[297,847,323],{"class":322},[297,849,326],{"class":303},[297,851,852,854,857,859,862,864,867],{"class":299,"line":329},[297,853,333],{"class":332},[297,855,856],{"class":340}," signInEmail",[297,858,786],{"class":357},[297,860,861],{"class":360}," useSignIn",[297,863,792],{"class":336},[297,865,866],{"class":322},"'email'",[297,868,869],{"class":336},")\n",[297,871,872],{"class":299,"line":367},[297,873,381],{"emptyLinePlaceholder":380},[297,875,876,879,882,885,887,891,895,899,901,904,906,908],{"class":299,"line":377},[297,877,878],{"class":332},"async",[297,880,881],{"class":332}," function",[297,883,884],{"class":360}," submit",[297,886,792],{"class":336},[297,888,890],{"class":889},"sgisi","email",[297,892,894],{"class":893},"sn-Jc",":",[297,896,898],{"class":897},"sr8De"," string",[297,900,247],{"class":336},[297,902,903],{"class":889},"password",[297,905,894],{"class":893},[297,907,898],{"class":897},[297,909,910],{"class":336},") {\n",[297,912,913,916,919,921,924,927,929,931,933],{"class":299,"line":384},[297,914,915],{"class":332},"  await",[297,917,856],{"class":918},"svFNh",[297,920,636],{"class":336},[297,922,923],{"class":360},"execute",[297,925,926],{"class":336},"({ ",[297,928,890],{"class":918},[297,930,247],{"class":336},[297,932,903],{"class":918},[297,934,935],{"class":336}," })\n",[297,937,938],{"class":299,"line":394},[297,939,940],{"class":336},"}\n",[297,942,943,945,947],{"class":299,"line":421},[297,944,370],{"class":303},[297,946,308],{"class":307},[297,948,326],{"class":303},[275,950,261],{"id":951},"useauthclient",[222,953,954,955,958],{},"Returns the Vue-safe Better Auth client on the client runtime and ",[233,956,957],{},"null"," on the server runtime. Use this for direct client\u002Fplugin method access when you do not need action state.",[287,960,962],{"className":546,"code":961,"language":549,"meta":293,"style":293},"const client = useAuthClient()\nawait client?.sendVerificationEmail({ email })\n",[233,963,964,978],{"__ignoreMap":293},[297,965,966,968,971,973,976],{"class":299,"line":300},[297,967,333],{"class":332},[297,969,970],{"class":340}," client",[297,972,786],{"class":357},[297,974,975],{"class":360}," useAuthClient",[297,977,364],{"class":558},[297,979,980,983,985,988,991,993,995],{"class":299,"line":329},[297,981,982],{"class":332},"await",[297,984,970],{"class":918},[297,986,987],{"class":558},"?.",[297,989,990],{"class":360},"sendVerificationEmail",[297,992,926],{"class":558},[297,994,890],{"class":918},[297,996,935],{"class":558},[675,998,1000],{"id":999},"promise-behavior","Promise Behavior",[222,1002,1003,1004,1008],{},"Raw Better Auth client methods return a promise that resolves when the ",[1005,1006,1007],"strong",{},"server responds",", not when local state updates.",[287,1010,1012],{"className":546,"code":1011,"language":549,"meta":293,"style":293},"\u002F\u002F This awaits the server response\nawait client.signIn.email({ email, password })\n\n\u002F\u002F Local state updates asynchronously after\n\u002F\u002F Use onSuccess callback for actions that depend on updated state\nawait client.signIn.email(\n  { email, password },\n  { onSuccess: () => navigateTo('\u002Fdashboard') }\n)\n",[233,1013,1014,1020,1045,1049,1054,1059,1076,1090,1116],{"__ignoreMap":293},[297,1015,1016],{"class":299,"line":300},[297,1017,1019],{"class":1018},"st7cf","\u002F\u002F This awaits the server response\n",[297,1021,1022,1024,1026,1028,1031,1033,1035,1037,1039,1041,1043],{"class":299,"line":329},[297,1023,982],{"class":332},[297,1025,970],{"class":918},[297,1027,636],{"class":558},[297,1029,756],{"class":1030},"sYvLG",[297,1032,636],{"class":558},[297,1034,890],{"class":360},[297,1036,926],{"class":558},[297,1038,890],{"class":918},[297,1040,247],{"class":558},[297,1042,903],{"class":918},[297,1044,935],{"class":558},[297,1046,1047],{"class":299,"line":367},[297,1048,381],{"emptyLinePlaceholder":380},[297,1050,1051],{"class":299,"line":377},[297,1052,1053],{"class":1018},"\u002F\u002F Local state updates asynchronously after\n",[297,1055,1056],{"class":299,"line":384},[297,1057,1058],{"class":1018},"\u002F\u002F Use onSuccess callback for actions that depend on updated state\n",[297,1060,1061,1063,1065,1067,1069,1071,1073],{"class":299,"line":394},[297,1062,982],{"class":332},[297,1064,970],{"class":918},[297,1066,636],{"class":558},[297,1068,756],{"class":1030},[297,1070,636],{"class":558},[297,1072,890],{"class":360},[297,1074,1075],{"class":558},"(\n",[297,1077,1078,1081,1083,1085,1087],{"class":299,"line":421},[297,1079,1080],{"class":558},"  { ",[297,1082,890],{"class":918},[297,1084,247],{"class":558},[297,1086,903],{"class":918},[297,1088,1089],{"class":558}," },\n",[297,1091,1092,1094,1097,1100,1103,1105,1108,1110,1113],{"class":299,"line":427},[297,1093,1080],{"class":558},[297,1095,1096],{"class":360},"onSuccess",[297,1098,894],{"class":1099},"sVnqq",[297,1101,1102],{"class":558}," () ",[297,1104,801],{"class":332},[297,1106,1107],{"class":360}," navigateTo",[297,1109,792],{"class":558},[297,1111,1112],{"class":322},"'\u002Fdashboard'",[297,1114,1115],{"class":558},") }\n",[297,1117,1118],{"class":299,"line":437},[297,1119,869],{"class":558},[222,1121,1122,1123,1125,1126,1128],{},"For form flows, prefer ",[233,1124,496],{}," and ",[233,1127,506],{}," because they normalize errors, sync session state, and apply configured redirects.",[275,1130,1132],{"id":1131},"usesignin-usesignup-redirects","useSignIn \u002F useSignUp redirects",[222,1134,1135,1136,1138,1139,1141],{},"If no ",[233,1137,1096],{}," callback is provided in method options, ",[233,1140,496],{}," will:",[617,1143,1144,1155,1162],{},[620,1145,1146,1147,1150,1151,1154],{},"navigate to ",[233,1148,1149],{},"route.query.redirect"," (or custom ",[233,1152,1153],{},"auth.redirectQueryKey",") when it is a local path",[620,1156,1157,1158,1161],{},"otherwise fallback to ",[233,1159,1160],{},"auth.redirects.authenticated"," when configured and an authenticated session is established",[620,1163,1164],{},"otherwise no automatic navigation",[287,1166,1168],{"className":546,"code":1167,"language":549,"meta":293,"style":293},"await useSignIn('email').execute({ email, password }) \u002F\u002F redirects to safe `?redirect=...` or auth.redirects.authenticated\n",[233,1169,1170],{"__ignoreMap":293},[297,1171,1172,1174,1176,1178,1180,1183,1185,1187,1189,1191,1193,1196],{"class":299,"line":300},[297,1173,982],{"class":332},[297,1175,861],{"class":360},[297,1177,792],{"class":558},[297,1179,866],{"class":322},[297,1181,1182],{"class":558},").",[297,1184,923],{"class":360},[297,1186,926],{"class":558},[297,1188,890],{"class":918},[297,1190,247],{"class":558},[297,1192,903],{"class":918},[297,1194,1195],{"class":558}," }) ",[297,1197,1198],{"class":1018},"\u002F\u002F redirects to safe `?redirect=...` or auth.redirects.authenticated\n",[222,1200,1201,1203,1204,1206],{},[233,1202,506],{}," follows the same redirect precedence:\nquery redirect > ",[233,1205,1160],{}," (only when authenticated) > no auto-redirect.",[675,1208,1210],{"id":1209},"signout",[233,1211,351],{},[222,1213,1214],{},"Signs the user out and clears the local session state.",[287,1216,1218],{"className":546,"code":1217,"language":549,"meta":293,"style":293},"await signOut()\n",[233,1219,1220],{"__ignoreMap":293},[297,1221,1222,1224,1227],{"class":299,"line":300},[297,1223,982],{"class":332},[297,1225,1226],{"class":360}," signOut",[297,1228,364],{"class":558},[222,1230,1231,1232,1235,1236,1239,1240,636],{},"If ",[233,1233,1234],{},"auth.redirects.logout"," is configured, ",[233,1237,1238],{},"signOut()"," will navigate there automatically (client-side), unless you provide ",[233,1241,1096],{},[222,1243,1244],{},[1005,1245,1246],{},"Options",[287,1248,1250],{"className":546,"code":1249,"language":549,"meta":293,"style":293},"await signOut({\n  onSuccess: () => navigateTo('\u002F'),\n})\n",[233,1251,1252,1261,1282],{"__ignoreMap":293},[297,1253,1254,1256,1258],{"class":299,"line":300},[297,1255,982],{"class":332},[297,1257,1226],{"class":360},[297,1259,1260],{"class":558},"({\n",[297,1262,1263,1266,1268,1270,1272,1274,1276,1279],{"class":299,"line":329},[297,1264,1265],{"class":360},"  onSuccess",[297,1267,894],{"class":1099},[297,1269,1102],{"class":558},[297,1271,801],{"class":332},[297,1273,1107],{"class":360},[297,1275,792],{"class":558},[297,1277,1278],{"class":322},"'\u002F'",[297,1280,1281],{"class":558},"),\n",[297,1283,1284],{"class":299,"line":367},[297,1285,818],{"class":558},[675,1287,1289],{"id":1288},"waitforsession",[233,1290,1291],{},"waitForSession()",[222,1293,1294,1295,1297,1298,636],{},"Waits until ",[233,1296,346],{}," becomes true or five seconds pass. A signed-out session can already be ready, so this helper does not wait for ",[233,1299,603],{},[287,1301,1303],{"className":546,"code":1302,"language":549,"meta":293,"style":293},"await waitForSession()\n\u002F\u002F The user is logged in, or the five-second wait ended.\n",[233,1304,1305,1314],{"__ignoreMap":293},[297,1306,1307,1309,1312],{"class":299,"line":300},[297,1308,982],{"class":332},[297,1310,1311],{"class":360}," waitForSession",[297,1313,364],{"class":558},[297,1315,1316],{"class":299,"line":329},[297,1317,1318],{"class":1018},"\u002F\u002F The user is logged in, or the five-second wait ended.\n",[1320,1321,1322,1323,1326,1327,636],"tip",{},"The function always resolves and returns no value. Check ",[233,1324,1325],{},"loggedIn.value"," after awaiting it if the next action requires authentication. To perform a session lookup and wait for it to finish, use ",[233,1328,1329],{},"await fetchSession()",[1331,1332,1334],"h4",{"id":1333},"fetchsession",[233,1335,632],{},[222,1337,1338],{},"Manually triggers a session refresh. Useful if you've updated user data on the server via a side channel.",[287,1340,1342],{"className":546,"code":1341,"language":549,"meta":293,"style":293},"await fetchSession()\n",[233,1343,1344],{"__ignoreMap":293},[297,1345,1346,1348,1351],{"class":299,"line":300},[297,1347,982],{"class":332},[297,1349,1350],{"class":360}," fetchSession",[297,1352,364],{"class":558},[222,1354,1355],{},[1005,1356,1246],{},[287,1358,1360],{"className":546,"code":1359,"language":549,"meta":293,"style":293},"await fetchSession({\n  headers, \u002F\u002F optional HeadersInit\n  force: true, \u002F\u002F disables Better Auth cookie cache for this fetch\n})\n",[233,1361,1362,1370,1380,1396],{"__ignoreMap":293},[297,1363,1364,1366,1368],{"class":299,"line":300},[297,1365,982],{"class":332},[297,1367,1350],{"class":360},[297,1369,1260],{"class":558},[297,1371,1372,1375,1377],{"class":299,"line":329},[297,1373,1374],{"class":918},"  headers",[297,1376,247],{"class":558},[297,1378,1379],{"class":1018},"\u002F\u002F optional HeadersInit\n",[297,1381,1382,1385,1387,1391,1393],{"class":299,"line":367},[297,1383,1384],{"class":1030},"  force",[297,1386,894],{"class":1099},[297,1388,1390],{"class":1389},"s3ZNE"," true",[297,1392,247],{"class":558},[297,1394,1395],{"class":1018},"\u002F\u002F disables Better Auth cookie cache for this fetch\n",[297,1397,1398],{"class":299,"line":377},[297,1399,818],{"class":558},[1331,1401,1403],{"id":1402},"updateuser",[233,1404,747],{},[222,1406,1407],{},"Updates the user on the server and optimistically patches local state. Local state reverts if the server call fails.",[222,1409,1410,1412,1413,1416,1417,247,1420,1423,1424,1427,1428,633,1430,1432],{},[233,1411,747],{}," accepts ",[233,1414,1415],{},"AuthUserUpdateInput",": ",[233,1418,1419],{},"name",[233,1421,1422],{},"image",", and input-enabled fields from your Better Auth configuration and client plugins. It no longer accepts user IDs, email verification status, admin roles, or custom fields declared with ",[233,1425,1426],{},"input: false",". Use Better Auth's dedicated email-change or admin actions for those operations. Import ",[233,1429,1415],{},[233,1431,704],{}," when annotating an update.",[287,1434,1436],{"className":546,"code":1435,"language":549,"meta":293,"style":293},"await updateUser({ name: 'New Name' })\n",[233,1437,1438],{"__ignoreMap":293},[297,1439,1440,1442,1445,1447,1449,1451,1454],{"class":299,"line":300},[297,1441,982],{"class":332},[297,1443,1444],{"class":360}," updateUser",[297,1446,926],{"class":558},[297,1448,1419],{"class":1030},[297,1450,894],{"class":1099},[297,1452,1453],{"class":322}," 'New Name'",[297,1455,935],{"class":558},[226,1457,1458,1459,1461],{},"During SSR, ",[233,1460,747],{}," only patches local state since no client is available.",[1320,1463,1464,1416,1467,1125,1469,1471,1472,1475],{},[1005,1465,1466],{},"Reactivity",[233,1468,341],{},[233,1470,569],{}," are global states using ",[233,1473,1474],{},"useState",". Changes in one component are instantly reflected everywhere.",[1477,1478],"read-more",{"title":1479,"to":151},"BetterAuthState component",[275,1481,1483],{"id":1482},"useauthrequestfetch","useAuthRequestFetch",[222,1485,1486],{},"Returns Nuxt's request-scoped fetch function. On SSR it preserves request context (including cookies); on client it behaves like regular fetch.",[222,1488,1489,1491,1492,1495,1496,1499,1500,1503],{},[233,1490,641],{}," defaults to ",[233,1493,1494],{},"GET",". For endpoints that only allow ",[233,1497,1498],{},"POST"," (or another method), pass ",[233,1501,1502],{},"method"," explicitly to preserve response type inference.",[222,1505,1506,1507,1125,1510,1513],{},"When endpoint typing is enabled, ",[233,1508,1509],{},"useFetch('\u002Fapi\u002Fauth\u002F...')",[233,1511,1512],{},"useLazyFetch('\u002Fapi\u002Fauth\u002F...')"," infer payloads directly from your Better Auth config:",[287,1515,1517],{"className":546,"code":1516,"filename":291,"language":549,"meta":293,"style":293},"const { data: customerState } = await useFetch('\u002Fapi\u002Fauth\u002Fcustomer\u002Fstate')\ncustomerState.value?.activeSubscriptions[0]?.toUpperCase()\n\nconst { data: customerById } = await useLazyFetch('\u002Fapi\u002Fauth\u002Fcustomer\u002F123\u002Fstate')\ncustomerById.value?.customerId.toUpperCase()\n",[233,1518,1519,1550,1578,1582,1611],{"__ignoreMap":293},[297,1520,1521,1523,1525,1528,1530,1533,1535,1537,1540,1543,1545,1548],{"class":299,"line":300},[297,1522,333],{"class":332},[297,1524,337],{"class":558},[297,1526,1527],{"class":1030},"data",[297,1529,1416],{"class":558},[297,1531,1532],{"class":340},"customerState",[297,1534,354],{"class":558},[297,1536,319],{"class":357},[297,1538,1539],{"class":332}," await",[297,1541,1542],{"class":360}," useFetch",[297,1544,792],{"class":558},[297,1546,1547],{"class":322},"'\u002Fapi\u002Fauth\u002Fcustomer\u002Fstate'",[297,1549,869],{"class":558},[297,1551,1552,1554,1556,1559,1561,1564,1567,1570,1573,1576],{"class":299,"line":329},[297,1553,1532],{"class":918},[297,1555,636],{"class":558},[297,1557,1558],{"class":1030},"value",[297,1560,987],{"class":558},[297,1562,1563],{"class":1030},"activeSubscriptions",[297,1565,1566],{"class":558},"[",[297,1568,1569],{"class":1389},"0",[297,1571,1572],{"class":558},"]?.",[297,1574,1575],{"class":360},"toUpperCase",[297,1577,364],{"class":558},[297,1579,1580],{"class":299,"line":367},[297,1581,381],{"emptyLinePlaceholder":380},[297,1583,1584,1586,1588,1590,1592,1595,1597,1599,1601,1604,1606,1609],{"class":299,"line":377},[297,1585,333],{"class":332},[297,1587,337],{"class":558},[297,1589,1527],{"class":1030},[297,1591,1416],{"class":558},[297,1593,1594],{"class":340},"customerById",[297,1596,354],{"class":558},[297,1598,319],{"class":357},[297,1600,1539],{"class":332},[297,1602,1603],{"class":360}," useLazyFetch",[297,1605,792],{"class":558},[297,1607,1608],{"class":322},"'\u002Fapi\u002Fauth\u002Fcustomer\u002F123\u002Fstate'",[297,1610,869],{"class":558},[297,1612,1613,1615,1617,1619,1621,1624,1626,1628],{"class":299,"line":384},[297,1614,1594],{"class":918},[297,1616,636],{"class":558},[297,1618,1558],{"class":1030},[297,1620,987],{"class":558},[297,1622,1623],{"class":1030},"customerId",[297,1625,636],{"class":558},[297,1627,1575],{"class":360},[297,1629,364],{"class":558},[222,1631,1632,1633,1636,1637,1639],{},"Global ",[233,1634,1635],{},"$fetch"," is not augmented by this module; use ",[233,1638,641],{}," for typed auth endpoint payloads with request-scoped cookies.",[287,1641,1643],{"className":546,"code":1642,"filename":291,"language":549,"meta":293,"style":293},"const requestFetch = useAuthRequestFetch()\nconst state = await requestFetch('\u002Fapi\u002Fauth\u002Fcustomer\u002Fstate')\nconst postOnly = await requestFetch('\u002Fapi\u002Fauth\u002Fcustomer\u002Fpost-only', { method: 'POST' })\n",[233,1644,1645,1659,1678],{"__ignoreMap":293},[297,1646,1647,1649,1652,1654,1657],{"class":299,"line":300},[297,1648,333],{"class":332},[297,1650,1651],{"class":340}," requestFetch",[297,1653,786],{"class":357},[297,1655,1656],{"class":360}," useAuthRequestFetch",[297,1658,364],{"class":558},[297,1660,1661,1663,1666,1668,1670,1672,1674,1676],{"class":299,"line":329},[297,1662,333],{"class":332},[297,1664,1665],{"class":340}," state",[297,1667,786],{"class":357},[297,1669,1539],{"class":332},[297,1671,1651],{"class":360},[297,1673,792],{"class":558},[297,1675,1547],{"class":322},[297,1677,869],{"class":558},[297,1679,1680,1682,1685,1687,1689,1691,1693,1696,1699,1701,1703,1706],{"class":299,"line":367},[297,1681,333],{"class":332},[297,1683,1684],{"class":340}," postOnly",[297,1686,786],{"class":357},[297,1688,1539],{"class":332},[297,1690,1651],{"class":360},[297,1692,792],{"class":558},[297,1694,1695],{"class":322},"'\u002Fapi\u002Fauth\u002Fcustomer\u002Fpost-only'",[297,1697,1698],{"class":558},", { ",[297,1700,1502],{"class":1030},[297,1702,894],{"class":1099},[297,1704,1705],{"class":322}," 'POST'",[297,1707,935],{"class":558},[222,1709,1710],{},"Use this when you need low-level control and want to build your own data loader pattern.",[275,1712,1714],{"id":1713},"useauthasyncdata","useAuthAsyncData",[222,1716,1717],{},"SSR-safe helper for auth-bound data loading.",[287,1719,1721],{"className":546,"code":1720,"filename":291,"language":549,"meta":293,"style":293},"const { data: customerState, pending, error } = await useAuthAsyncData(\n  'customer-state',\n  requestFetch => requestFetch('\u002Fapi\u002Fauth\u002Fcustomer\u002Fstate'),\n)\n",[233,1722,1723,1756,1764,1780],{"__ignoreMap":293},[297,1724,1725,1727,1729,1731,1733,1735,1737,1740,1742,1745,1747,1749,1751,1754],{"class":299,"line":300},[297,1726,333],{"class":332},[297,1728,337],{"class":558},[297,1730,1527],{"class":1030},[297,1732,1416],{"class":558},[297,1734,1532],{"class":340},[297,1736,247],{"class":558},[297,1738,1739],{"class":340},"pending",[297,1741,247],{"class":558},[297,1743,1744],{"class":340},"error",[297,1746,354],{"class":558},[297,1748,319],{"class":357},[297,1750,1539],{"class":332},[297,1752,1753],{"class":360}," useAuthAsyncData",[297,1755,1075],{"class":558},[297,1757,1758,1761],{"class":299,"line":329},[297,1759,1760],{"class":322},"  'customer-state'",[297,1762,1763],{"class":558},",\n",[297,1765,1766,1769,1772,1774,1776,1778],{"class":299,"line":367},[297,1767,1768],{"class":889},"  requestFetch",[297,1770,1771],{"class":332}," =>",[297,1773,1651],{"class":360},[297,1775,792],{"class":558},[297,1777,1547],{"class":322},[297,1779,1281],{"class":558},[297,1781,1782],{"class":299,"line":377},[297,1783,869],{"class":558},[222,1785,1786,1787,1790],{},"When route typing is enabled, payload types for ",[233,1788,1789],{},"\u002Fapi\u002Fauth\u002F*"," endpoints are inferred automatically.",[222,1792,1793],{},"By default:",[617,1795,1796,1808,1814],{},[620,1797,1798,1801,1802,1804,1805,1807],{},[233,1799,1800],{},"requireAuth"," is ",[233,1803,591],{}," (unauthenticated users resolve to ",[233,1806,957],{}," without calling the endpoint).",[620,1809,1810,1491,1812,636],{},[233,1811,1527],{},[233,1813,957],{},[620,1815,1816,1817,636],{},"errors are exposed through ",[233,1818,1744],{},[287,1820,1822],{"className":546,"code":1821,"filename":291,"language":549,"meta":293,"style":293},"const { data } = await useAuthAsyncData(\n  'public-profile',\n  requestFetch => requestFetch('\u002Fapi\u002Fprofile\u002Fpublic'),\n  { requireAuth: false },\n)\n",[233,1823,1824,1842,1849,1864,1877],{"__ignoreMap":293},[297,1825,1826,1828,1830,1832,1834,1836,1838,1840],{"class":299,"line":300},[297,1827,333],{"class":332},[297,1829,337],{"class":558},[297,1831,1527],{"class":340},[297,1833,354],{"class":558},[297,1835,319],{"class":357},[297,1837,1539],{"class":332},[297,1839,1753],{"class":360},[297,1841,1075],{"class":558},[297,1843,1844,1847],{"class":299,"line":329},[297,1845,1846],{"class":322},"  'public-profile'",[297,1848,1763],{"class":558},[297,1850,1851,1853,1855,1857,1859,1862],{"class":299,"line":367},[297,1852,1768],{"class":889},[297,1854,1771],{"class":332},[297,1856,1651],{"class":360},[297,1858,792],{"class":558},[297,1860,1861],{"class":322},"'\u002Fapi\u002Fprofile\u002Fpublic'",[297,1863,1281],{"class":558},[297,1865,1866,1868,1870,1872,1875],{"class":299,"line":377},[297,1867,1080],{"class":558},[297,1869,1800],{"class":1030},[297,1871,894],{"class":1099},[297,1873,1874],{"class":1389}," false",[297,1876,1089],{"class":558},[297,1878,1879],{"class":299,"line":384},[297,1880,869],{"class":558},[275,1882,1884],{"id":1883},"useaction","useAction",[222,1886,1887],{},"Creates a reusable async action handle with normalized error state.",[287,1889,1892],{"className":546,"code":1890,"filename":1891,"language":549,"meta":293,"style":293},"const saveProfile = useAction(async (payload: { name: string }) => {\n  return await $fetch('\u002Fapi\u002Fprofile', { method: 'PATCH', body: payload })\n})\n\nawait saveProfile.execute({ name: 'Max' })\n\nif (saveProfile.status.value === 'error') {\n  console.error(saveProfile.error.value?.message)\n}\n","components\u002FProfileForm.vue",[233,1893,1894,1932,1967,1971,1975,1996,2000,2027,2055],{"__ignoreMap":293},[297,1895,1896,1898,1901,1903,1906,1908,1910,1913,1916,1918,1920,1922,1924,1926,1928,1930],{"class":299,"line":300},[297,1897,333],{"class":332},[297,1899,1900],{"class":340}," saveProfile",[297,1902,786],{"class":357},[297,1904,1905],{"class":360}," useAction",[297,1907,792],{"class":558},[297,1909,878],{"class":332},[297,1911,1912],{"class":558}," (",[297,1914,1915],{"class":889},"payload",[297,1917,894],{"class":893},[297,1919,337],{"class":558},[297,1921,1419],{"class":918},[297,1923,894],{"class":893},[297,1925,898],{"class":897},[297,1927,1195],{"class":558},[297,1929,801],{"class":332},[297,1931,804],{"class":558},[297,1933,1934,1936,1938,1941,1943,1946,1948,1950,1952,1955,1957,1960,1962,1965],{"class":299,"line":329},[297,1935,809],{"class":332},[297,1937,1539],{"class":332},[297,1939,1940],{"class":360}," $fetch",[297,1942,792],{"class":558},[297,1944,1945],{"class":322},"'\u002Fapi\u002Fprofile'",[297,1947,1698],{"class":558},[297,1949,1502],{"class":1030},[297,1951,894],{"class":1099},[297,1953,1954],{"class":322}," 'PATCH'",[297,1956,247],{"class":558},[297,1958,1959],{"class":1030},"body",[297,1961,894],{"class":1099},[297,1963,1964],{"class":918}," payload",[297,1966,935],{"class":558},[297,1968,1969],{"class":299,"line":367},[297,1970,818],{"class":558},[297,1972,1973],{"class":299,"line":377},[297,1974,381],{"emptyLinePlaceholder":380},[297,1976,1977,1979,1981,1983,1985,1987,1989,1991,1994],{"class":299,"line":384},[297,1978,982],{"class":332},[297,1980,1900],{"class":918},[297,1982,636],{"class":558},[297,1984,923],{"class":360},[297,1986,926],{"class":558},[297,1988,1419],{"class":1030},[297,1990,894],{"class":1099},[297,1992,1993],{"class":322}," 'Max'",[297,1995,935],{"class":558},[297,1997,1998],{"class":299,"line":394},[297,1999,381],{"emptyLinePlaceholder":380},[297,2001,2002,2005,2007,2010,2012,2015,2017,2019,2022,2025],{"class":299,"line":421},[297,2003,2004],{"class":332},"if",[297,2006,1912],{"class":558},[297,2008,2009],{"class":918},"saveProfile",[297,2011,636],{"class":558},[297,2013,2014],{"class":1030},"status",[297,2016,636],{"class":558},[297,2018,1558],{"class":1030},[297,2020,2021],{"class":893}," ===",[297,2023,2024],{"class":322}," 'error'",[297,2026,910],{"class":558},[297,2028,2029,2032,2034,2036,2038,2040,2042,2044,2046,2048,2050,2053],{"class":299,"line":427},[297,2030,2031],{"class":918},"  console",[297,2033,636],{"class":558},[297,2035,1744],{"class":360},[297,2037,792],{"class":558},[297,2039,2009],{"class":918},[297,2041,636],{"class":558},[297,2043,1744],{"class":1030},[297,2045,636],{"class":558},[297,2047,1558],{"class":1030},[297,2049,987],{"class":558},[297,2051,2052],{"class":1030},"message",[297,2054,869],{"class":558},[297,2056,2057],{"class":299,"line":437},[297,2058,940],{"class":558},[222,2060,2061,2063,2064,2066,2067,894],{},[233,2062,1884],{}," returns the same handle shape as ",[233,2065,265],{},"\u002F",[233,2068,269],{},[583,2070,2071,2075,2083,2087],{},[586,2072,2074],{"name":923,"type":2073},"(...args) => Promise\u003Cvoid>","Executes the action and never throws.",[586,2076,2078,2079,2082],{"name":2014,"type":2077},"'idle' | 'pending' | 'success' | 'error'","Current status of the latest ",[233,2080,2081],{},"execute()"," call.",[586,2084,2086],{"name":1527,"type":2085},"any | null","Last successful result.",[586,2088,2090,2091,2094],{"name":1744,"type":2089},"AuthActionError | null","Normalized error from thrown errors or ",[233,2092,2093],{},"{ error }"," responses.",[275,2096,2098],{"id":2097},"runwithsessionrefresh","runWithSessionRefresh",[222,2100,2101,2102,2104,2105,1125,2107,636],{},"Runs a custom auth action, then refreshes ",[233,2103,284],{}," state after the action succeeds. Use it for custom Better Auth endpoints that create, replace, or update the current session outside ",[233,2106,496],{},[233,2108,506],{},[287,2110,2112],{"className":546,"code":2111,"filename":548,"language":549,"meta":293,"style":293},"const submitCustomLogin = useAction((body: { token: string }) =>\n  runWithSessionRefresh(() =>\n    $fetch('\u002Fapi\u002Fauth\u002Fsign-in\u002Fcustom', { method: 'POST', body }),\n  ),\n)\n\nawait submitCustomLogin.execute({ token })\n",[233,2113,2114,2145,2155,2180,2185,2189,2193],{"__ignoreMap":293},[297,2115,2116,2118,2121,2123,2125,2128,2130,2132,2134,2136,2138,2140,2142],{"class":299,"line":300},[297,2117,333],{"class":332},[297,2119,2120],{"class":340}," submitCustomLogin",[297,2122,786],{"class":357},[297,2124,1905],{"class":360},[297,2126,2127],{"class":558},"((",[297,2129,1959],{"class":889},[297,2131,894],{"class":893},[297,2133,337],{"class":558},[297,2135,691],{"class":918},[297,2137,894],{"class":893},[297,2139,898],{"class":897},[297,2141,1195],{"class":558},[297,2143,2144],{"class":332},"=>\n",[297,2146,2147,2150,2153],{"class":299,"line":329},[297,2148,2149],{"class":360},"  runWithSessionRefresh",[297,2151,2152],{"class":558},"(() ",[297,2154,2144],{"class":332},[297,2156,2157,2160,2162,2165,2167,2169,2171,2173,2175,2177],{"class":299,"line":367},[297,2158,2159],{"class":360},"    $fetch",[297,2161,792],{"class":558},[297,2163,2164],{"class":322},"'\u002Fapi\u002Fauth\u002Fsign-in\u002Fcustom'",[297,2166,1698],{"class":558},[297,2168,1502],{"class":1030},[297,2170,894],{"class":1099},[297,2172,1705],{"class":322},[297,2174,247],{"class":558},[297,2176,1959],{"class":918},[297,2178,2179],{"class":558}," }),\n",[297,2181,2182],{"class":299,"line":377},[297,2183,2184],{"class":558},"  ),\n",[297,2186,2187],{"class":299,"line":384},[297,2188,869],{"class":558},[297,2190,2191],{"class":299,"line":394},[297,2192,381],{"emptyLinePlaceholder":380},[297,2194,2195,2197,2199,2201,2203,2205,2207],{"class":299,"line":421},[297,2196,982],{"class":332},[297,2198,2120],{"class":918},[297,2200,636],{"class":558},[297,2202,923],{"class":360},[297,2204,926],{"class":558},[297,2206,691],{"class":918},[297,2208,935],{"class":558},[222,2210,2211,2212,2214],{},"The helper returns the callback result. It skips the session refresh when the callback throws or returns a Better Auth ",[233,2213,2093],{}," result.",[275,2216,2218],{"id":2217},"useauthclientaction","useAuthClientAction",[222,2220,2221,2222,2224],{},"Wraps plugin\u002Fclient methods from ",[233,2223,486],{}," in the same action handle pattern.",[287,2226,2229],{"className":546,"code":2227,"filename":2228,"language":549,"meta":293,"style":293},"const checkout = useAuthClientAction((client) => client.checkout)\n\nawait checkout.execute({ slug: 'pro' })\n\nif (checkout.status.value === 'error') {\n  console.error(checkout.error.value?.message)\n}\n","pages\u002Fpricing.vue",[233,2230,2231,2261,2265,2287,2291,2313,2339],{"__ignoreMap":293},[297,2232,2233,2235,2238,2240,2243,2245,2247,2250,2252,2254,2256,2259],{"class":299,"line":300},[297,2234,333],{"class":332},[297,2236,2237],{"class":340}," checkout",[297,2239,786],{"class":357},[297,2241,2242],{"class":360}," useAuthClientAction",[297,2244,2127],{"class":558},[297,2246,753],{"class":889},[297,2248,2249],{"class":558},") ",[297,2251,801],{"class":332},[297,2253,970],{"class":918},[297,2255,636],{"class":558},[297,2257,2258],{"class":1030},"checkout",[297,2260,869],{"class":558},[297,2262,2263],{"class":299,"line":329},[297,2264,381],{"emptyLinePlaceholder":380},[297,2266,2267,2269,2271,2273,2275,2277,2280,2282,2285],{"class":299,"line":367},[297,2268,982],{"class":332},[297,2270,2237],{"class":918},[297,2272,636],{"class":558},[297,2274,923],{"class":360},[297,2276,926],{"class":558},[297,2278,2279],{"class":1030},"slug",[297,2281,894],{"class":1099},[297,2283,2284],{"class":322}," 'pro'",[297,2286,935],{"class":558},[297,2288,2289],{"class":299,"line":377},[297,2290,381],{"emptyLinePlaceholder":380},[297,2292,2293,2295,2297,2299,2301,2303,2305,2307,2309,2311],{"class":299,"line":384},[297,2294,2004],{"class":332},[297,2296,1912],{"class":558},[297,2298,2258],{"class":918},[297,2300,636],{"class":558},[297,2302,2014],{"class":1030},[297,2304,636],{"class":558},[297,2306,1558],{"class":1030},[297,2308,2021],{"class":893},[297,2310,2024],{"class":322},[297,2312,910],{"class":558},[297,2314,2315,2317,2319,2321,2323,2325,2327,2329,2331,2333,2335,2337],{"class":299,"line":394},[297,2316,2031],{"class":918},[297,2318,636],{"class":558},[297,2320,1744],{"class":360},[297,2322,792],{"class":558},[297,2324,2258],{"class":918},[297,2326,636],{"class":558},[297,2328,1744],{"class":1030},[297,2330,636],{"class":558},[297,2332,1558],{"class":1030},[297,2334,987],{"class":558},[297,2336,2052],{"class":1030},[297,2338,869],{"class":558},[297,2340,2341],{"class":299,"line":421},[297,2342,940],{"class":558},[222,2344,2345],{},"Nested methods are supported via selector functions:",[287,2347,2350],{"className":546,"code":2348,"filename":2349,"language":549,"meta":293,"style":293},"const openPortal = useAuthClientAction((client) => client.customer.portal)\nawait openPortal.execute()\n","pages\u002Fapp\u002Findex.vue",[233,2351,2352,2385],{"__ignoreMap":293},[297,2353,2354,2356,2359,2361,2363,2365,2367,2369,2371,2373,2375,2378,2380,2383],{"class":299,"line":300},[297,2355,333],{"class":332},[297,2357,2358],{"class":340}," openPortal",[297,2360,786],{"class":357},[297,2362,2242],{"class":360},[297,2364,2127],{"class":558},[297,2366,753],{"class":889},[297,2368,2249],{"class":558},[297,2370,801],{"class":332},[297,2372,970],{"class":918},[297,2374,636],{"class":558},[297,2376,2377],{"class":1030},"customer",[297,2379,636],{"class":558},[297,2381,2382],{"class":1030},"portal",[297,2384,869],{"class":558},[297,2386,2387,2389,2391,2393,2395],{"class":299,"line":329},[297,2388,982],{"class":332},[297,2390,2358],{"class":918},[297,2392,636],{"class":558},[297,2394,923],{"class":360},[297,2396,364],{"class":558},[275,2398,265],{"id":2399},"usesignin",[222,2401,2402,2403,2406,2407,636],{},"Returns a keyed action handle for Better Auth ",[233,2404,2405],{},"signIn.*",". Each method handle exposes template-friendly async state, similar to composables like ",[233,2408,2409],{},"useFetch",[287,2411,2413],{"className":546,"code":2412,"filename":548,"language":549,"meta":293,"style":293},"const { execute, data, status, error } = useSignIn('email')\n\nawait execute(\n  { email, password, rememberMe },\n  {\n    onSuccess: () => navigateTo('\u002Fapp'),\n    onError: (ctx) => console.error(ctx.error),\n  },\n)\n\nif (status.value === 'error') {\n  console.error(error.value?.message)\n}\n",[233,2414,2415,2447,2451,2460,2477,2482,2502,2535,2540,2544,2549,2568,2591],{"__ignoreMap":293},[297,2416,2417,2419,2421,2423,2425,2427,2429,2431,2433,2435,2437,2439,2441,2443,2445],{"class":299,"line":300},[297,2418,333],{"class":332},[297,2420,337],{"class":558},[297,2422,923],{"class":340},[297,2424,247],{"class":558},[297,2426,1527],{"class":340},[297,2428,247],{"class":558},[297,2430,2014],{"class":340},[297,2432,247],{"class":558},[297,2434,1744],{"class":340},[297,2436,354],{"class":558},[297,2438,319],{"class":357},[297,2440,861],{"class":360},[297,2442,792],{"class":558},[297,2444,866],{"class":322},[297,2446,869],{"class":558},[297,2448,2449],{"class":299,"line":329},[297,2450,381],{"emptyLinePlaceholder":380},[297,2452,2453,2455,2458],{"class":299,"line":367},[297,2454,982],{"class":332},[297,2456,2457],{"class":360}," execute",[297,2459,1075],{"class":558},[297,2461,2462,2464,2466,2468,2470,2472,2475],{"class":299,"line":377},[297,2463,1080],{"class":558},[297,2465,890],{"class":918},[297,2467,247],{"class":558},[297,2469,903],{"class":918},[297,2471,247],{"class":558},[297,2473,2474],{"class":918},"rememberMe",[297,2476,1089],{"class":558},[297,2478,2479],{"class":299,"line":384},[297,2480,2481],{"class":558},"  {\n",[297,2483,2484,2487,2489,2491,2493,2495,2497,2500],{"class":299,"line":394},[297,2485,2486],{"class":360},"    onSuccess",[297,2488,894],{"class":1099},[297,2490,1102],{"class":558},[297,2492,801],{"class":332},[297,2494,1107],{"class":360},[297,2496,792],{"class":558},[297,2498,2499],{"class":322},"'\u002Fapp'",[297,2501,1281],{"class":558},[297,2503,2504,2507,2509,2511,2514,2516,2518,2521,2523,2525,2527,2529,2531,2533],{"class":299,"line":421},[297,2505,2506],{"class":360},"    onError",[297,2508,894],{"class":1099},[297,2510,1912],{"class":558},[297,2512,2513],{"class":889},"ctx",[297,2515,2249],{"class":558},[297,2517,801],{"class":332},[297,2519,2520],{"class":918}," console",[297,2522,636],{"class":558},[297,2524,1744],{"class":360},[297,2526,792],{"class":558},[297,2528,2513],{"class":918},[297,2530,636],{"class":558},[297,2532,1744],{"class":1030},[297,2534,1281],{"class":558},[297,2536,2537],{"class":299,"line":427},[297,2538,2539],{"class":558},"  },\n",[297,2541,2542],{"class":299,"line":437},[297,2543,869],{"class":558},[297,2545,2547],{"class":299,"line":2546},10,[297,2548,381],{"emptyLinePlaceholder":380},[297,2550,2552,2554,2556,2558,2560,2562,2564,2566],{"class":299,"line":2551},11,[297,2553,2004],{"class":332},[297,2555,1912],{"class":558},[297,2557,2014],{"class":918},[297,2559,636],{"class":558},[297,2561,1558],{"class":1030},[297,2563,2021],{"class":893},[297,2565,2024],{"class":322},[297,2567,910],{"class":558},[297,2569,2571,2573,2575,2577,2579,2581,2583,2585,2587,2589],{"class":299,"line":2570},12,[297,2572,2031],{"class":918},[297,2574,636],{"class":558},[297,2576,1744],{"class":360},[297,2578,792],{"class":558},[297,2580,1744],{"class":918},[297,2582,636],{"class":558},[297,2584,1558],{"class":1030},[297,2586,987],{"class":558},[297,2588,2052],{"class":1030},[297,2590,869],{"class":558},[297,2592,2594],{"class":299,"line":2593},13,[297,2595,940],{"class":558},[222,2597,2598,2599,2602],{},"For OAuth sign-in, use the ",[233,2600,2601],{},"social"," key and pass the provider in the payload:",[287,2604,2606],{"className":546,"code":2605,"filename":548,"language":549,"meta":293,"style":293},"await useSignIn('social').execute({ provider: 'github' })\n",[233,2607,2608],{"__ignoreMap":293},[297,2609,2610,2612,2614,2616,2619,2621,2623,2625,2628,2630,2633],{"class":299,"line":300},[297,2611,982],{"class":332},[297,2613,861],{"class":360},[297,2615,792],{"class":558},[297,2617,2618],{"class":322},"'social'",[297,2620,1182],{"class":558},[297,2622,923],{"class":360},[297,2624,926],{"class":558},[297,2626,2627],{"class":1030},"provider",[297,2629,894],{"class":1099},[297,2631,2632],{"class":322}," 'github'",[297,2634,935],{"class":558},[222,2636,2637,2638,2641,2642,2645,2646,2649],{},"Provider keys are inferred from ",[233,2639,2640],{},"server\u002Fauth.config.ts"," ",[233,2643,2644],{},"socialProviders"," keys.\nWhen ",[233,2647,2648],{},"callbackURL"," is omitted, the module auto-fills it using the same safe redirect order as other auth flows:",[617,2651,2652,2658,2662],{},[620,2653,2654,2655,2657],{},"safe query redirect (",[233,2656,1153],{},")",[620,2659,2660],{},[233,2661,1160],{},[620,2663,2664],{},"otherwise no fallback callback URL",[222,2666,2667],{},"Use renaming to avoid collisions when you use multiple methods in the same scope:",[287,2669,2671],{"className":546,"code":2670,"filename":548,"language":549,"meta":293,"style":293},"const {\n  execute: loginWithEmail,\n  status: statusEmail,\n  error: errorEmail,\n} = useSignIn('email')\n\nconst {\n  execute: loginWithPasskey,\n  status: statusPasskey,\n  error: errorPasskey,\n} = useSignIn('passkey')\n",[233,2672,2673,2679,2691,2703,2715,2730,2734,2740,2751,2762,2773],{"__ignoreMap":293},[297,2674,2675,2677],{"class":299,"line":300},[297,2676,333],{"class":332},[297,2678,804],{"class":558},[297,2680,2681,2684,2686,2689],{"class":299,"line":329},[297,2682,2683],{"class":1030},"  execute",[297,2685,1416],{"class":558},[297,2687,2688],{"class":340},"loginWithEmail",[297,2690,1763],{"class":558},[297,2692,2693,2696,2698,2701],{"class":299,"line":367},[297,2694,2695],{"class":1030},"  status",[297,2697,1416],{"class":558},[297,2699,2700],{"class":340},"statusEmail",[297,2702,1763],{"class":558},[297,2704,2705,2708,2710,2713],{"class":299,"line":377},[297,2706,2707],{"class":1030},"  error",[297,2709,1416],{"class":558},[297,2711,2712],{"class":340},"errorEmail",[297,2714,1763],{"class":558},[297,2716,2717,2720,2722,2724,2726,2728],{"class":299,"line":384},[297,2718,2719],{"class":558},"} ",[297,2721,319],{"class":357},[297,2723,861],{"class":360},[297,2725,792],{"class":558},[297,2727,866],{"class":322},[297,2729,869],{"class":558},[297,2731,2732],{"class":299,"line":394},[297,2733,381],{"emptyLinePlaceholder":380},[297,2735,2736,2738],{"class":299,"line":421},[297,2737,333],{"class":332},[297,2739,804],{"class":558},[297,2741,2742,2744,2746,2749],{"class":299,"line":427},[297,2743,2683],{"class":1030},[297,2745,1416],{"class":558},[297,2747,2748],{"class":340},"loginWithPasskey",[297,2750,1763],{"class":558},[297,2752,2753,2755,2757,2760],{"class":299,"line":437},[297,2754,2695],{"class":1030},[297,2756,1416],{"class":558},[297,2758,2759],{"class":340},"statusPasskey",[297,2761,1763],{"class":558},[297,2763,2764,2766,2768,2771],{"class":299,"line":2546},[297,2765,2707],{"class":1030},[297,2767,1416],{"class":558},[297,2769,2770],{"class":340},"errorPasskey",[297,2772,1763],{"class":558},[297,2774,2775,2777,2779,2781,2783,2786],{"class":299,"line":2551},[297,2776,2719],{"class":558},[297,2778,319],{"class":357},[297,2780,861],{"class":360},[297,2782,792],{"class":558},[297,2784,2785],{"class":322},"'passkey'",[297,2787,869],{"class":558},[222,2789,2790],{},"Each method returns an action handle:",[583,2792,2793,2796,2800,2806],{},[586,2794,2795],{"name":923,"type":2073},"Calls the underlying Better Auth method and never throws.",[586,2797,2078,2798,2082],{"name":2014,"type":2077},[233,2799,2081],{},[586,2801,2802,2803,2805],{"name":1527,"type":2085},"Last successful result. Cleared on each new ",[233,2804,2081],{}," and on errors.",[586,2807,2808,2809,1182],{"name":1744,"type":2089},"Normalized error for the latest call (cleared on new ",[233,2810,2081],{},[226,2812,2813,2814,2816,2817,1125,2819,636],{},"Each sign-in method has independent state. When you call ",[233,2815,2081],{}," multiple times, only the latest call updates ",[233,2818,2014],{},[233,2820,1744],{},[675,2822,2824],{"id":2823},"error-state-and-promise-behavior","Error state and promise behavior",[222,2826,281,2827,247,2829,254,2831,2833,2834,2837,2838,2840],{},[233,2828,2014],{},[233,2830,1527],{},[233,2832,1744],{}," as your source of truth. The action handle always sets ",[233,2835,2836],{},"status='error'"," and populates normalized ",[233,2839,1744],{}," when a sign-in attempt fails.",[226,2842,2843,2844,2846,2847,1125,2849,254,2851,2854],{},"Better Auth methods can signal failure by throwing or by resolving to a ",[233,2845,2093],{}," result. In both cases, the action handle updates ",[233,2848,2014],{},[233,2850,1744],{},[233,2852,2853],{},"await execute()"," always resolves.",[1331,2856,2858,2859,2657],{"id":2857},"recommended-flow-execute","Recommended flow (",[233,2860,923],{},[287,2862,2864],{"className":546,"code":2863,"filename":548,"language":549,"meta":293,"style":293},"const { execute, data, status, error } = useSignIn('email')\n\nawait execute({ email, password })\n\nif (status.value === 'error') {\n  console.error(error.value?.message)\n}\n\nif (status.value === 'success') {\n  console.log(data.value)\n}\n",[233,2865,2866,2898,2902,2918,2922,2940,2962,2966,2970,2989,3008],{"__ignoreMap":293},[297,2867,2868,2870,2872,2874,2876,2878,2880,2882,2884,2886,2888,2890,2892,2894,2896],{"class":299,"line":300},[297,2869,333],{"class":332},[297,2871,337],{"class":558},[297,2873,923],{"class":340},[297,2875,247],{"class":558},[297,2877,1527],{"class":340},[297,2879,247],{"class":558},[297,2881,2014],{"class":340},[297,2883,247],{"class":558},[297,2885,1744],{"class":340},[297,2887,354],{"class":558},[297,2889,319],{"class":357},[297,2891,861],{"class":360},[297,2893,792],{"class":558},[297,2895,866],{"class":322},[297,2897,869],{"class":558},[297,2899,2900],{"class":299,"line":329},[297,2901,381],{"emptyLinePlaceholder":380},[297,2903,2904,2906,2908,2910,2912,2914,2916],{"class":299,"line":367},[297,2905,982],{"class":332},[297,2907,2457],{"class":360},[297,2909,926],{"class":558},[297,2911,890],{"class":918},[297,2913,247],{"class":558},[297,2915,903],{"class":918},[297,2917,935],{"class":558},[297,2919,2920],{"class":299,"line":377},[297,2921,381],{"emptyLinePlaceholder":380},[297,2923,2924,2926,2928,2930,2932,2934,2936,2938],{"class":299,"line":384},[297,2925,2004],{"class":332},[297,2927,1912],{"class":558},[297,2929,2014],{"class":918},[297,2931,636],{"class":558},[297,2933,1558],{"class":1030},[297,2935,2021],{"class":893},[297,2937,2024],{"class":322},[297,2939,910],{"class":558},[297,2941,2942,2944,2946,2948,2950,2952,2954,2956,2958,2960],{"class":299,"line":394},[297,2943,2031],{"class":918},[297,2945,636],{"class":558},[297,2947,1744],{"class":360},[297,2949,792],{"class":558},[297,2951,1744],{"class":918},[297,2953,636],{"class":558},[297,2955,1558],{"class":1030},[297,2957,987],{"class":558},[297,2959,2052],{"class":1030},[297,2961,869],{"class":558},[297,2963,2964],{"class":299,"line":421},[297,2965,940],{"class":558},[297,2967,2968],{"class":299,"line":427},[297,2969,381],{"emptyLinePlaceholder":380},[297,2971,2972,2974,2976,2978,2980,2982,2984,2987],{"class":299,"line":437},[297,2973,2004],{"class":332},[297,2975,1912],{"class":558},[297,2977,2014],{"class":918},[297,2979,636],{"class":558},[297,2981,1558],{"class":1030},[297,2983,2021],{"class":893},[297,2985,2986],{"class":322}," 'success'",[297,2988,910],{"class":558},[297,2990,2991,2993,2995,2998,3000,3002,3004,3006],{"class":299,"line":2546},[297,2992,2031],{"class":918},[297,2994,636],{"class":558},[297,2996,2997],{"class":360},"log",[297,2999,792],{"class":558},[297,3001,1527],{"class":918},[297,3003,636],{"class":558},[297,3005,1558],{"class":1030},[297,3007,869],{"class":558},[297,3009,3010],{"class":299,"line":2551},[297,3011,940],{"class":558},[275,3013,269],{"id":3014},"usesignup",[222,3016,3017,3018,3020,3021,636],{},"Same API as ",[233,3019,265],{},", but wraps Better Auth ",[233,3022,3023],{},"signUp.*",[287,3025,3028],{"className":546,"code":3026,"filename":3027,"language":549,"meta":293,"style":293},"const { execute, data, status, error } = useSignUp('email')\n\nawait execute(\n  { email, password, name },\n  {\n    onSuccess: () => navigateTo('\u002Fwelcome'),\n    onError: (ctx) => console.error(ctx.error),\n  },\n)\n","pages\u002Fsignup.vue",[233,3029,3030,3063,3067,3075,3091,3095,3114,3144,3148],{"__ignoreMap":293},[297,3031,3032,3034,3036,3038,3040,3042,3044,3046,3048,3050,3052,3054,3057,3059,3061],{"class":299,"line":300},[297,3033,333],{"class":332},[297,3035,337],{"class":558},[297,3037,923],{"class":340},[297,3039,247],{"class":558},[297,3041,1527],{"class":340},[297,3043,247],{"class":558},[297,3045,2014],{"class":340},[297,3047,247],{"class":558},[297,3049,1744],{"class":340},[297,3051,354],{"class":558},[297,3053,319],{"class":357},[297,3055,3056],{"class":360}," useSignUp",[297,3058,792],{"class":558},[297,3060,866],{"class":322},[297,3062,869],{"class":558},[297,3064,3065],{"class":299,"line":329},[297,3066,381],{"emptyLinePlaceholder":380},[297,3068,3069,3071,3073],{"class":299,"line":367},[297,3070,982],{"class":332},[297,3072,2457],{"class":360},[297,3074,1075],{"class":558},[297,3076,3077,3079,3081,3083,3085,3087,3089],{"class":299,"line":377},[297,3078,1080],{"class":558},[297,3080,890],{"class":918},[297,3082,247],{"class":558},[297,3084,903],{"class":918},[297,3086,247],{"class":558},[297,3088,1419],{"class":918},[297,3090,1089],{"class":558},[297,3092,3093],{"class":299,"line":384},[297,3094,2481],{"class":558},[297,3096,3097,3099,3101,3103,3105,3107,3109,3112],{"class":299,"line":394},[297,3098,2486],{"class":360},[297,3100,894],{"class":1099},[297,3102,1102],{"class":558},[297,3104,801],{"class":332},[297,3106,1107],{"class":360},[297,3108,792],{"class":558},[297,3110,3111],{"class":322},"'\u002Fwelcome'",[297,3113,1281],{"class":558},[297,3115,3116,3118,3120,3122,3124,3126,3128,3130,3132,3134,3136,3138,3140,3142],{"class":299,"line":421},[297,3117,2506],{"class":360},[297,3119,894],{"class":1099},[297,3121,1912],{"class":558},[297,3123,2513],{"class":889},[297,3125,2249],{"class":558},[297,3127,801],{"class":332},[297,3129,2520],{"class":918},[297,3131,636],{"class":558},[297,3133,1744],{"class":360},[297,3135,792],{"class":558},[297,3137,2513],{"class":918},[297,3139,636],{"class":558},[297,3141,1744],{"class":1030},[297,3143,1281],{"class":558},[297,3145,3146],{"class":299,"line":427},[297,3147,2539],{"class":558},[297,3149,3150],{"class":299,"line":437},[297,3151,869],{"class":558},[222,3153,3154,3156,3157,247,3159,247,3161,247,3163,3165,3166,636],{},[233,3155,269],{}," returns the same action handle shape (",[233,3158,923],{},[233,3160,2014],{},[233,3162,1527],{},[233,3164,1744],{},") and follows the same error normalization semantics as ",[233,3167,265],{},[1477,3169],{"title":3170,"to":84},"OAuth Providers guide",[275,3172,3174],{"id":3173},"usesignout","useSignOut",[222,3176,3177,3178,3181,3182,1125,3184,636],{},"Wraps ",[233,3179,3180],{},"useUserSession().signOut()"," with the same action handle shape as ",[233,3183,496],{},[233,3185,506],{},[287,3187,3190],{"className":289,"code":3188,"filename":3189,"language":292,"meta":293,"style":293},"\u003Cscript setup lang=\"ts\">\nconst { execute: signOut, status, error } = useSignOut()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cbutton :disabled=\"status === 'pending'\" @click=\"signOut()\">\n    {{ status === 'pending' ? 'Signing out…' : 'Sign out' }}\n  \u003C\u002Fbutton>\n  \u003Cp v-if=\"error\" role=\"alert\">{{ error.message }}\u003C\u002Fp>\n\u003C\u002Ftemplate>\n","components\u002FSignOutButton.vue",[233,3191,3192,3208,3237,3245,3249,3257,3279,3284,3292,3325],{"__ignoreMap":293},[297,3193,3194,3196,3198,3200,3202,3204,3206],{"class":299,"line":300},[297,3195,304],{"class":303},[297,3197,308],{"class":307},[297,3199,312],{"class":311},[297,3201,315],{"class":311},[297,3203,319],{"class":318},[297,3205,323],{"class":322},[297,3207,326],{"class":303},[297,3209,3210,3212,3214,3216,3218,3220,3222,3224,3226,3228,3230,3232,3235],{"class":299,"line":329},[297,3211,333],{"class":332},[297,3213,337],{"class":336},[297,3215,923],{"class":1030},[297,3217,1416],{"class":336},[297,3219,351],{"class":340},[297,3221,247],{"class":336},[297,3223,2014],{"class":340},[297,3225,247],{"class":336},[297,3227,1744],{"class":340},[297,3229,354],{"class":336},[297,3231,319],{"class":357},[297,3233,3234],{"class":360}," useSignOut",[297,3236,364],{"class":336},[297,3238,3239,3241,3243],{"class":299,"line":367},[297,3240,370],{"class":303},[297,3242,308],{"class":307},[297,3244,326],{"class":303},[297,3246,3247],{"class":299,"line":377},[297,3248,381],{"emptyLinePlaceholder":380},[297,3250,3251,3253,3255],{"class":299,"line":384},[297,3252,304],{"class":303},[297,3254,389],{"class":307},[297,3256,326],{"class":303},[297,3258,3259,3261,3263,3266,3268,3271,3273,3275,3277],{"class":299,"line":394},[297,3260,397],{"class":303},[297,3262,400],{"class":307},[297,3264,3265],{"class":311}," :disabled",[297,3267,319],{"class":318},[297,3269,3270],{"class":322},"\"status === 'pending'\"",[297,3272,411],{"class":311},[297,3274,319],{"class":318},[297,3276,416],{"class":322},[297,3278,326],{"class":303},[297,3280,3281],{"class":299,"line":421},[297,3282,3283],{"class":336},"    {{ status === 'pending' ? 'Signing out…' : 'Sign out' }}\n",[297,3285,3286,3288,3290],{"class":299,"line":427},[297,3287,430],{"class":303},[297,3289,400],{"class":307},[297,3291,326],{"class":303},[297,3293,3294,3296,3298,3300,3302,3305,3308,3310,3313,3316,3319,3321,3323],{"class":299,"line":437},[297,3295,397],{"class":303},[297,3297,222],{"class":307},[297,3299,403],{"class":311},[297,3301,319],{"class":318},[297,3303,3304],{"class":322},"\"error\"",[297,3306,3307],{"class":311}," role",[297,3309,319],{"class":318},[297,3311,3312],{"class":322},"\"alert\"",[297,3314,3315],{"class":303},">",[297,3317,3318],{"class":336},"{{ error.message }}",[297,3320,370],{"class":303},[297,3322,222],{"class":307},[297,3324,326],{"class":303},[297,3326,3327,3329,3331],{"class":299,"line":2546},[297,3328,370],{"class":303},[297,3330,389],{"class":307},[297,3332,326],{"class":303},[222,3334,3335,3336,3338,3339,3342],{},"On success, it clears the local session and follows ",[233,3337,1234],{}," when configured. Pass ",[233,3340,3341],{},"execute({ onSuccess })"," to run your own callback instead of the configured redirect. The action stays pending until the callback completes.",[222,3344,3345,3346,3348,3349,1125,3352,3354,3355,3357,3358,266,3360,3362],{},"On a failed sign-out request, ",[233,3347,2014],{}," becomes ",[233,3350,3351],{},"'error'",[233,3353,1744],{}," contains the normalized error. The session remains intact, and neither the success callback nor redirect runs. As with the other action composables, ",[233,3356,2081],{}," resolves after capturing errors; read ",[233,3359,2014],{},[233,3361,1744],{}," to determine the outcome. Concurrent calls share the existing sign-out request.",[222,3364,3365,3366,3368,3369,3372],{},"Create the composable during setup; call ",[233,3367,2081],{}," only on the client. Signing out an anonymous user does not delete their account. Use the anonymous plugin's ",[233,3370,3371],{},"deleteAnonymousUser"," method explicitly when that is your application's policy.",[275,3374,3376],{"id":3375},"related-pages","Related pages",[617,3378,3379,3384,3389],{},[620,3380,3381],{},[3382,3383,52],"a",{"href":53},[620,3385,3386],{},[3382,3387,3388],{"href":147},"Server utilities",[620,3390,3391],{},[3382,3392,150],{"href":151},[3394,3395,3396],"style",{},"html pre.shiki code .sL9le, html code.shiki .sL9le{--shiki-light:#383A42;--shiki-default:#36F9F6;--shiki-dark:#36F9F6}html pre.shiki code .stweg, html code.shiki .stweg{--shiki-light:#E45649;--shiki-default:#72F1B8;--shiki-dark:#72F1B8}html pre.shiki code .s0frj, html code.shiki .s0frj{--shiki-light:#986801;--shiki-light-font-style:inherit;--shiki-default:#FEDE5D;--shiki-default-font-style:italic;--shiki-dark:#FEDE5D;--shiki-dark-font-style:italic}html pre.shiki code .sNM9w, html code.shiki .sNM9w{--shiki-light:#383A42;--shiki-default:#B6B1B1;--shiki-dark:#B6B1B1}html pre.shiki code .sPAZv, html code.shiki .sPAZv{--shiki-light:#50A14F;--shiki-default:#FF8B39;--shiki-dark:#FF8B39}html pre.shiki code .sqe1H, html code.shiki .sqe1H{--shiki-light:#A626A4;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .sEEOt, html code.shiki .sEEOt{--shiki-light:#383A42;--shiki-default:#FFFFFFEE;--shiki-dark:#FFFFFFEE}html pre.shiki code .s6Rhl, html code.shiki .s6Rhl{--shiki-light:#986801;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .sQBpM, html code.shiki .sQBpM{--shiki-light:#0184BC;--shiki-default:#FFFFFFEE;--shiki-dark:#FFFFFFEE}html pre.shiki code .sfT9l, html code.shiki .sfT9l{--shiki-light:#4078F2;--shiki-default:#36F9F6;--shiki-dark:#36F9F6}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 .s17Py, html code.shiki .s17Py{--shiki-light:#383A42;--shiki-default:#BBBBBB;--shiki-dark:#BBBBBB}html pre.shiki code .sgisi, html code.shiki .sgisi{--shiki-light:#383A42;--shiki-light-font-style:inherit;--shiki-default:#FF7EDB;--shiki-default-font-style:italic;--shiki-dark:#FF7EDB;--shiki-dark-font-style:italic}html pre.shiki code .sn-Jc, html code.shiki .sn-Jc{--shiki-light:#0184BC;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .sr8De, html code.shiki .sr8De{--shiki-light:#0184BC;--shiki-default:#FE4450;--shiki-dark:#FE4450}html pre.shiki code .svFNh, html code.shiki .svFNh{--shiki-light:#383A42;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .st7cf, html code.shiki .st7cf{--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-default:#848BBD;--shiki-default-font-style:italic;--shiki-dark:#848BBD;--shiki-dark-font-style:italic}html pre.shiki code .sYvLG, html code.shiki .sYvLG{--shiki-light:#E45649;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .sVnqq, html code.shiki .sVnqq{--shiki-light:#0184BC;--shiki-default:#B6B1B1;--shiki-dark:#B6B1B1}html pre.shiki code .s3ZNE, html code.shiki .s3ZNE{--shiki-light:#986801;--shiki-default:#F97E72;--shiki-dark:#F97E72}",{"title":293,"searchDepth":329,"depth":329,"links":3398},[3399,3400,3401,3402,3405,3408,3412,3413,3414,3415,3416,3417,3420,3421,3422],{"id":277,"depth":329,"text":278},{"id":446,"depth":329,"text":447},{"id":539,"depth":329,"text":540},{"id":666,"depth":329,"text":667,"children":3403},[3404],{"id":677,"depth":367,"text":678},{"id":951,"depth":329,"text":261,"children":3406},[3407],{"id":999,"depth":367,"text":1000},{"id":1131,"depth":329,"text":1132,"children":3409},[3410,3411],{"id":1209,"depth":367,"text":351},{"id":1288,"depth":367,"text":1291},{"id":1482,"depth":329,"text":1483},{"id":1713,"depth":329,"text":1714},{"id":1883,"depth":329,"text":1884},{"id":2097,"depth":329,"text":2098},{"id":2217,"depth":329,"text":2218},{"id":2399,"depth":329,"text":265,"children":3418},[3419],{"id":2823,"depth":367,"text":2824},{"id":3014,"depth":329,"text":269},{"id":3173,"depth":329,"text":3174},{"id":3375,"depth":329,"text":3376},"API reference for client-side composables.","md",null,{},{"title":142,"description":3423},"-S4G2aFlatg0LHBWPRibafiDZ3Rf8biuW3wj3W4qMmU",[3430,3432],{"title":133,"path":134,"stem":135,"description":3431,"children":-1},"Translate authentication errors with @nuxtjs\u002Fi18n.",{"title":146,"path":147,"stem":148,"description":3433,"children":-1},"API reference for server-side helpers available in Nitro event handlers.",1792532371893]