[{"data":1,"prerenderedAt":531,"buildId":532},["ShallowReactive",2],{"-errors-nuxt-auth-invalid-plugin-source":3,"-errors-nuxt-auth-invalid-plugin-source-surround":314,"navigation_docs":325},{"id":4,"title":5,"body":6,"description":303,"extension":304,"links":305,"meta":306,"navigation":308,"path":310,"seo":311,"stem":312,"__hash__":313},"docs\u002F6.errors\u002Fnuxt-auth-invalid-plugin-source.md","NUXT_AUTH_INVALID_PLUGIN_SOURCE: Auth plugin path must be absolute",{"type":7,"value":8,"toc":298},"minimark",[9,27,32,36,40,43,46,267,274,278,281,294],[10,11,17],"pre",{"className":12,"code":13,"filename":14,"language":15,"meta":16,"style":16},"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","",[18,19,20],"code",{"__ignoreMap":16},[21,22,25],"span",{"class":23,"line":24},"line",1,[21,26,13],{},[28,29,31],"h2",{"id":30},"why-this-happens","Why this happens",[33,34,35],"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.",[28,37,39],{"id":38},"how-to-fix-it","How to fix it",[33,41,42],{},"Resolve the plugin source with createResolver(import.meta.url).resolve(...) before registering it.",[33,44,45],{},"Resolve the path relative to the module that owns the plugin:",[10,47,52],{"className":48,"code":49,"filename":50,"language":51,"meta":16,"style":16},"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",[18,53,54,84,91,108,129,164,196,217,249,255,261],{"__ignoreMap":16},[21,55,56,60,64,68,71,74,77,80],{"class":23,"line":24},[21,57,59],{"class":58},"sqe1H","import",[21,61,63],{"class":62},"s17Py"," { ",[21,65,67],{"class":66},"sYvLG","createResolver",[21,69,70],{"class":62},", ",[21,72,73],{"class":66},"defineNuxtModule",[21,75,76],{"class":62}," } ",[21,78,79],{"class":58},"from",[21,81,83],{"class":82},"sPAZv"," '@nuxt\u002Fkit'\n",[21,85,87],{"class":23,"line":86},2,[21,88,90],{"emptyLinePlaceholder":89},true,"\n",[21,92,94,97,101,105],{"class":23,"line":93},3,[21,95,96],{"class":58},"export",[21,98,100],{"class":99},"sKg8T"," default",[21,102,104],{"class":103},"sfT9l"," defineNuxtModule",[21,106,107],{"class":62},"({\n",[21,109,111,114,117,121,123,126],{"class":23,"line":110},4,[21,112,113],{"class":103},"  setup",[21,115,116],{"class":62},"(",[21,118,120],{"class":119},"sgisi","_options",[21,122,70],{"class":62},[21,124,125],{"class":119},"nuxt",[21,127,128],{"class":62},") {\n",[21,130,132,135,139,143,146,148,150,153,156,158,161],{"class":23,"line":131},5,[21,133,134],{"class":58},"    const",[21,136,138],{"class":137},"s6Rhl"," resolver",[21,140,142],{"class":141},"sQBpM"," =",[21,144,145],{"class":103}," createResolver",[21,147,116],{"class":62},[21,149,59],{"class":58},[21,151,152],{"class":62},".",[21,154,155],{"class":66},"meta",[21,157,152],{"class":62},[21,159,160],{"class":66},"url",[21,162,163],{"class":62},")\n",[21,165,167,171,173,176,178,181,184,187,190,193],{"class":23,"line":166},6,[21,168,170],{"class":169},"svFNh","    nuxt",[21,172,152],{"class":62},[21,174,175],{"class":103},"hook",[21,177,116],{"class":62},[21,179,180],{"class":82},"'better-auth:plugins:extend'",[21,182,183],{"class":62},", (",[21,185,186],{"class":119},"plugins",[21,188,189],{"class":62},") ",[21,191,192],{"class":58},"=>",[21,194,195],{"class":62}," {\n",[21,197,199,202,204,207,211,214],{"class":23,"line":198},7,[21,200,201],{"class":169},"      plugins",[21,203,152],{"class":62},[21,205,206],{"class":66},"server",[21,208,210],{"class":209},"sn-Jc"," ||",[21,212,213],{"class":141},"=",[21,215,216],{"class":62}," []\n",[21,218,220,222,224,226,228,231,233,236,238,241,243,246],{"class":23,"line":219},8,[21,221,201],{"class":169},[21,223,152],{"class":62},[21,225,206],{"class":66},[21,227,152],{"class":62},[21,229,230],{"class":103},"push",[21,232,116],{"class":62},[21,234,235],{"class":169},"resolver",[21,237,152],{"class":62},[21,239,240],{"class":103},"resolve",[21,242,116],{"class":62},[21,244,245],{"class":82},"'.\u002Fruntime\u002Fauth-plugin.ts'",[21,247,248],{"class":62},"))\n",[21,250,252],{"class":23,"line":251},9,[21,253,254],{"class":62},"    })\n",[21,256,258],{"class":23,"line":257},10,[21,259,260],{"class":62},"  },\n",[21,262,264],{"class":23,"line":263},11,[21,265,266],{"class":62},"})\n",[33,268,269,270,273],{},"Use ",[18,271,272],{},"plugins.client"," for a client auth plugin. The referenced file must exist and export the plugin expected by the auth configuration.",[28,275,277],{"id":276},"verify-the-fix","Verify the fix",[33,279,280],{},"Run pnpm exec nuxt prepare. The registered path should be absolute and the contributed plugin should appear in the generated auth configuration.",[33,282,283,284,289,290,152],{},"See ",[285,286,288],"a",{"href":287},"\u002Fcore-concepts\u002Fserver-auth","Configure server auth"," or return to the ",[285,291,293],{"href":292},"\u002Ferrors","error reference",[295,296,297],"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":16,"searchDepth":86,"depth":86,"links":299},[300,301,302],{"id":30,"depth":86,"text":31},{"id":38,"depth":86,"text":39},{"id":276,"depth":86,"text":277},"Resolve plugin file paths before registering them with better-auth:plugins:extend.","md",null,{"editPath":307},"diagnostics\u002Fpages.ts",{"title":309},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source",{"title":5,"description":303},"6.errors\u002Fnuxt-auth-invalid-plugin-source","qEFr8V-FHEjAJn8mUd6vBoqb_yJtBbkAsRbZJOEg5Xo",[315,320],{"title":316,"path":317,"stem":318,"description":319,"children":-1},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export","Export defineServerAuth(...) as the default export of your server auth config.",{"title":321,"path":322,"stem":323,"description":324,"children":-1},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config","Create the server or client auth config file that Nuxt Better Auth could not find.",[326,364,389,436,461,482],{"title":327,"path":328,"stem":329,"children":330,"icon":333},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[331,334,339,344,349,354,359],{"title":332,"path":328,"stem":329,"icon":333},"Introduction","i-lucide-sparkles",{"title":335,"path":336,"stem":337,"icon":338},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":340,"path":341,"stem":342,"icon":343},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":345,"path":346,"stem":347,"icon":348},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":350,"path":351,"stem":352,"icon":353},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":355,"path":356,"stem":357,"icon":358},"Schema Generation (NuxtHub)","\u002Fgetting-started\u002Fschema-generation","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":360,"path":361,"stem":362,"icon":363},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":365,"path":366,"stem":367,"children":368,"page":388},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[369,372,376,380,384],{"title":370,"path":287,"stem":371},"serverAuth()","2.core-concepts\u002F1.server-auth",{"title":373,"path":374,"stem":375},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":377,"path":378,"stem":379},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":381,"path":382,"stem":383},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":385,"path":386,"stem":387},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":390,"path":391,"stem":392,"children":393,"page":388},"Guides","\u002Fguides","3.guides",[394,398,403,407,411,415,420,424,428,432],{"title":395,"path":396,"stem":397},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":399,"path":400,"stem":401,"icon":402},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":404,"path":405,"stem":406},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":408,"path":409,"stem":410},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":412,"path":413,"stem":414},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":416,"path":417,"stem":418,"icon":419},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":421,"path":422,"stem":423},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":425,"path":426,"stem":427},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":429,"path":430,"stem":431},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":433,"path":434,"stem":435},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":437,"path":438,"stem":439,"children":440,"page":388},"Integrations","\u002Fintegrations","4.integrations",[441,445,449,453,457],{"title":442,"path":443,"stem":444},"NuxtHub","\u002Fintegrations\u002Fnuxthub","4.integrations\u002F1.nuxthub",{"title":446,"path":447,"stem":448},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":450,"path":451,"stem":452},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":454,"path":455,"stem":456},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":458,"path":459,"stem":460},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F5.mcp",{"title":462,"path":463,"stem":464,"children":465,"page":388},"API Reference","\u002Fapi","5.api",[466,470,474,478],{"title":467,"path":468,"stem":469},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":471,"path":472,"stem":473},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":475,"path":476,"stem":477},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":479,"path":480,"stem":481},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types",{"title":483,"path":292,"stem":484,"children":485,"icon":402},"Errors","6.errors\u002F0.index",[486,488,492,496,500,504,505,506,507,511,515,519,523,527],{"title":487,"path":292,"stem":484},"Overview",{"title":489,"path":490,"stem":491},"Better Auth CLI is not installed","\u002Ferrors\u002Fnuxt-auth-cli-missing","6.errors\u002Fnuxt-auth-cli-missing",{"title":493,"path":494,"stem":495},"Better Auth CLI version does not match better-auth","\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":497,"path":498,"stem":499},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed",{"title":501,"path":502,"stem":503},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema","6.errors\u002Fnuxt-auth-empty-schema",{"title":316,"path":317,"stem":318},{"title":309,"path":310,"stem":312},{"title":321,"path":322,"stem":323},{"title":508,"path":509,"stem":510},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":512,"path":513,"stem":514},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider",{"title":516,"path":517,"stem":518},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":520,"path":521,"stem":522},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":524,"path":525,"stem":526},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only",{"title":528,"path":529,"stem":530},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",1795996229990,"6c3c8832-e88a-4d4f-9e6d-7fef286a1917"]