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