[{"data":1,"prerenderedAt":527},["ShallowReactive",2],{"navigation_docs":3,"-errors-nuxt-auth-invalid-plugin-source":216,"-errors-nuxt-auth-invalid-plugin-source-surround":522},[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":218,"body":219,"description":514,"extension":515,"links":516,"meta":517,"navigation":519,"path":186,"seo":520,"stem":187,"__hash__":521},"docs\u002F6.errors\u002Fnuxt-auth-invalid-plugin-source.md","NUXT_AUTH_INVALID_PLUGIN_SOURCE: Auth plugin path must be absolute",{"type":220,"value":221,"toc":509},"minimark",[222,240,245,249,253,256,259,480,487,491,494,505],[223,224,230],"pre",{"className":225,"code":226,"filename":227,"language":228,"meta":229,"style":229},"language-txt shiki shiki-themes one-light synthwave-84 synthwave-84","[NUXT_AUTH_INVALID_PLUGIN_SOURCE] Modules must register absolute plugin source paths. Received: .\u002Fruntime\u002Fauth-plugin.ts\n","Example error","txt","",[231,232,233],"code",{"__ignoreMap":229},[234,235,238],"span",{"class":236,"line":237},"line",1,[234,239,226],{},[241,242,244],"h2",{"id":243},"why-this-happens","Why this happens",[246,247,248],"p",{},"A Nuxt module contributed a relative path through better-auth:plugins:extend. Relative paths depend on the consuming app directory, so the auth module requires each contributor to resolve its own plugin files.",[241,250,252],{"id":251},"how-to-fix-it","How to fix it",[246,254,255],{},"Resolve the plugin source with createResolver(import.meta.url).resolve(...) before registering it.",[246,257,258],{},"Resolve the path relative to the module that owns the plugin:",[223,260,265],{"className":261,"code":262,"filename":263,"language":264,"meta":229,"style":229},"language-ts shiki shiki-themes one-light synthwave-84 synthwave-84","import { createResolver, defineNuxtModule } from '@nuxt\u002Fkit'\n\nexport default defineNuxtModule({\n  setup(_options, nuxt) {\n    const resolver = createResolver(import.meta.url)\n    nuxt.hook('better-auth:plugins:extend', (plugins) => {\n      plugins.server ||= []\n      plugins.server.push(resolver.resolve('.\u002Fruntime\u002Fauth-plugin.ts'))\n    })\n  },\n})\n","modules\u002Fauth-extension.ts","ts",[231,266,267,297,304,321,342,377,409,430,462,468,474],{"__ignoreMap":229},[234,268,269,273,277,281,284,287,290,293],{"class":236,"line":237},[234,270,272],{"class":271},"sqe1H","import",[234,274,276],{"class":275},"s17Py"," { ",[234,278,280],{"class":279},"sYvLG","createResolver",[234,282,283],{"class":275},", ",[234,285,286],{"class":279},"defineNuxtModule",[234,288,289],{"class":275}," } ",[234,291,292],{"class":271},"from",[234,294,296],{"class":295},"sPAZv"," '@nuxt\u002Fkit'\n",[234,298,300],{"class":236,"line":299},2,[234,301,303],{"emptyLinePlaceholder":302},true,"\n",[234,305,307,310,314,318],{"class":236,"line":306},3,[234,308,309],{"class":271},"export",[234,311,313],{"class":312},"sKg8T"," default",[234,315,317],{"class":316},"sfT9l"," defineNuxtModule",[234,319,320],{"class":275},"({\n",[234,322,324,327,330,334,336,339],{"class":236,"line":323},4,[234,325,326],{"class":316},"  setup",[234,328,329],{"class":275},"(",[234,331,333],{"class":332},"sgisi","_options",[234,335,283],{"class":275},[234,337,338],{"class":332},"nuxt",[234,340,341],{"class":275},") {\n",[234,343,345,348,352,356,359,361,363,366,369,371,374],{"class":236,"line":344},5,[234,346,347],{"class":271},"    const",[234,349,351],{"class":350},"s6Rhl"," resolver",[234,353,355],{"class":354},"sQBpM"," =",[234,357,358],{"class":316}," createResolver",[234,360,329],{"class":275},[234,362,272],{"class":271},[234,364,365],{"class":275},".",[234,367,368],{"class":279},"meta",[234,370,365],{"class":275},[234,372,373],{"class":279},"url",[234,375,376],{"class":275},")\n",[234,378,380,384,386,389,391,394,397,400,403,406],{"class":236,"line":379},6,[234,381,383],{"class":382},"svFNh","    nuxt",[234,385,365],{"class":275},[234,387,388],{"class":316},"hook",[234,390,329],{"class":275},[234,392,393],{"class":295},"'better-auth:plugins:extend'",[234,395,396],{"class":275},", (",[234,398,399],{"class":332},"plugins",[234,401,402],{"class":275},") ",[234,404,405],{"class":271},"=>",[234,407,408],{"class":275}," {\n",[234,410,412,415,417,420,424,427],{"class":236,"line":411},7,[234,413,414],{"class":382},"      plugins",[234,416,365],{"class":275},[234,418,419],{"class":279},"server",[234,421,423],{"class":422},"sn-Jc"," ||",[234,425,426],{"class":354},"=",[234,428,429],{"class":275}," []\n",[234,431,433,435,437,439,441,444,446,449,451,454,456,459],{"class":236,"line":432},8,[234,434,414],{"class":382},[234,436,365],{"class":275},[234,438,419],{"class":279},[234,440,365],{"class":275},[234,442,443],{"class":316},"push",[234,445,329],{"class":275},[234,447,448],{"class":382},"resolver",[234,450,365],{"class":275},[234,452,453],{"class":316},"resolve",[234,455,329],{"class":275},[234,457,458],{"class":295},"'.\u002Fruntime\u002Fauth-plugin.ts'",[234,460,461],{"class":275},"))\n",[234,463,465],{"class":236,"line":464},9,[234,466,467],{"class":275},"    })\n",[234,469,471],{"class":236,"line":470},10,[234,472,473],{"class":275},"  },\n",[234,475,477],{"class":236,"line":476},11,[234,478,479],{"class":275},"})\n",[246,481,482,483,486],{},"Use ",[231,484,485],{},"plugins.client"," for a client auth plugin. The referenced file must exist and export the plugin expected by the auth configuration.",[241,488,490],{"id":489},"verify-the-fix","Verify the fix",[246,492,493],{},"Run pnpm exec nuxt prepare. The registered path should be absolute and the contributed plugin should appear in the generated auth configuration.",[246,495,496,497,501,502,365],{},"See ",[498,499,500],"a",{"href":49},"Configure server auth"," or return to the ",[498,503,504],{"href":159},"error reference",[506,507,508],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sqe1H, html code.shiki .sqe1H{--shiki-light:#A626A4;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .s17Py, html code.shiki .s17Py{--shiki-light:#383A42;--shiki-default:#BBBBBB;--shiki-dark:#BBBBBB}html pre.shiki code .sYvLG, html code.shiki .sYvLG{--shiki-light:#E45649;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .sPAZv, html code.shiki .sPAZv{--shiki-light:#50A14F;--shiki-default:#FF8B39;--shiki-dark:#FF8B39}html pre.shiki code .sKg8T, html code.shiki .sKg8T{--shiki-light:#E45649;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .sfT9l, html code.shiki .sfT9l{--shiki-light:#4078F2;--shiki-default:#36F9F6;--shiki-dark:#36F9F6}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 .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 .svFNh, html code.shiki .svFNh{--shiki-light:#383A42;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .sn-Jc, html code.shiki .sn-Jc{--shiki-light:#0184BC;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}",{"title":229,"searchDepth":299,"depth":299,"links":510},[511,512,513],{"id":243,"depth":299,"text":244},{"id":251,"depth":299,"text":252},{"id":489,"depth":299,"text":490},"Resolve plugin file paths before registering them with better-auth:plugins:extend.","md",null,{"editPath":518},"diagnostics\u002Fpages.ts",{"title":185},{"title":218,"description":514},"qEFr8V-FHEjAJn8mUd6vBoqb_yJtBbkAsRbZJOEg5Xo",[523,525],{"title":181,"path":182,"stem":183,"description":524,"children":-1},"Export defineServerAuth(...) as the default export of your server auth config.",{"title":189,"path":190,"stem":191,"description":526,"children":-1},"Create the server or client auth config file that Nuxt Better Auth could not find.",1792532578700]