[{"data":1,"prerenderedAt":488},["ShallowReactive",2],{"navigation_docs":3,"-errors-nuxt-auth-no-database-provider":208,"-errors-nuxt-auth-no-database-provider-surround":483},[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],{"title":163,"path":159,"stem":160},"Overview",{"title":165,"path":166,"stem":167},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed",{"title":169,"path":170,"stem":171},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema","6.errors\u002Fnuxt-auth-empty-schema",{"title":173,"path":174,"stem":175},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export",{"title":177,"path":178,"stem":179},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":181,"path":182,"stem":183},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config",{"title":185,"path":186,"stem":187},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":189,"path":190,"stem":191},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider",{"title":193,"path":194,"stem":195},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":197,"path":198,"stem":199},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":201,"path":202,"stem":203},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only",{"title":205,"path":206,"stem":207},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",{"id":209,"title":210,"body":211,"description":475,"extension":476,"links":477,"meta":478,"navigation":480,"path":190,"seo":481,"stem":191,"__hash__":482},"docs\u002F6.errors\u002Fnuxt-auth-no-database-provider.md","NUXT_AUTH_NO_DATABASE_PROVIDER: No database provider is enabled",{"type":212,"value":213,"toc":470},"minimark",[214,232,237,241,245,248,259,262,448,452,455,466],[215,216,222],"pre",{"className":217,"code":218,"filename":219,"language":220,"meta":221,"style":221},"language-txt shiki shiki-themes one-light synthwave-84 synthwave-84","[NUXT_AUTH_NO_DATABASE_PROVIDER] No database provider is enabled.\n","Example error","txt","",[223,224,225],"code",{"__ignoreMap":221},[226,227,230],"span",{"class":228,"line":229},"line",1,[226,231,218],{},[233,234,236],"h2",{"id":235},"why-this-happens","Why this happens",[238,239,240],"p",{},"The better-auth:database:providers hook left no enabled provider in the registry. The module normally registers a fallback provider named none, so this error usually follows a custom module that removes or disables the defaults. It does not mean every app must use NuxtHub.",[233,242,244],{"id":243},"how-to-fix-it","How to fix it",[238,246,247],{},"Register an enabled provider with the better-auth:database:providers hook.",[238,249,250,251,254,255,258],{},"If you only want to use your own Better Auth adapter, keep the default provider registry and configure ",[223,252,253],{},"database"," in ",[223,256,257],{},"defineServerAuth()",".",[238,260,261],{},"If your module intentionally replaces the registry, it must leave an enabled provider. A minimal provider that delegates database configuration to the user's auth config is:",[215,263,268],{"className":264,"code":265,"filename":266,"language":267,"meta":221,"style":221},"language-ts shiki shiki-themes one-light synthwave-84 synthwave-84","import { defineNuxtModule } from '@nuxt\u002Fkit'\n\nexport default defineNuxtModule({\n  setup(_options, nuxt) {\n    nuxt.hook('better-auth:database:providers', (providers) => {\n      providers.none = {\n        priority: 0,\n        buildDatabaseCode: () => 'export function createDatabase() { return undefined }',\n      }\n    })\n  },\n})\n","modules\u002Fauth-database.ts","ts",[223,269,270,294,301,318,340,372,389,406,424,430,436,442],{"__ignoreMap":221},[226,271,272,276,280,284,287,290],{"class":228,"line":229},[226,273,275],{"class":274},"sqe1H","import",[226,277,279],{"class":278},"s17Py"," { ",[226,281,283],{"class":282},"sYvLG","defineNuxtModule",[226,285,286],{"class":278}," } ",[226,288,289],{"class":274},"from",[226,291,293],{"class":292},"sPAZv"," '@nuxt\u002Fkit'\n",[226,295,297],{"class":228,"line":296},2,[226,298,300],{"emptyLinePlaceholder":299},true,"\n",[226,302,304,307,311,315],{"class":228,"line":303},3,[226,305,306],{"class":274},"export",[226,308,310],{"class":309},"sKg8T"," default",[226,312,314],{"class":313},"sfT9l"," defineNuxtModule",[226,316,317],{"class":278},"({\n",[226,319,321,324,327,331,334,337],{"class":228,"line":320},4,[226,322,323],{"class":313},"  setup",[226,325,326],{"class":278},"(",[226,328,330],{"class":329},"sgisi","_options",[226,332,333],{"class":278},", ",[226,335,336],{"class":329},"nuxt",[226,338,339],{"class":278},") {\n",[226,341,343,347,349,352,354,357,360,363,366,369],{"class":228,"line":342},5,[226,344,346],{"class":345},"svFNh","    nuxt",[226,348,258],{"class":278},[226,350,351],{"class":313},"hook",[226,353,326],{"class":278},[226,355,356],{"class":292},"'better-auth:database:providers'",[226,358,359],{"class":278},", (",[226,361,362],{"class":329},"providers",[226,364,365],{"class":278},") ",[226,367,368],{"class":274},"=>",[226,370,371],{"class":278}," {\n",[226,373,375,378,380,383,387],{"class":228,"line":374},6,[226,376,377],{"class":345},"      providers",[226,379,258],{"class":278},[226,381,382],{"class":282},"none",[226,384,386],{"class":385},"sQBpM"," =",[226,388,371],{"class":278},[226,390,392,395,399,403],{"class":228,"line":391},7,[226,393,394],{"class":282},"        priority",[226,396,398],{"class":397},"sVnqq",":",[226,400,402],{"class":401},"s3ZNE"," 0",[226,404,405],{"class":278},",\n",[226,407,409,412,414,417,419,422],{"class":228,"line":408},8,[226,410,411],{"class":313},"        buildDatabaseCode",[226,413,398],{"class":397},[226,415,416],{"class":278}," () ",[226,418,368],{"class":274},[226,420,421],{"class":292}," 'export function createDatabase() { return undefined }'",[226,423,405],{"class":278},[226,425,427],{"class":228,"line":426},9,[226,428,429],{"class":278},"      }\n",[226,431,433],{"class":228,"line":432},10,[226,434,435],{"class":278},"    })\n",[226,437,439],{"class":228,"line":438},11,[226,440,441],{"class":278},"  },\n",[226,443,445],{"class":228,"line":444},12,[226,446,447],{"class":278},"})\n",[233,449,451],{"id":450},"verify-the-fix","Verify the fix",[238,453,454],{},"Run pnpm exec nuxt prepare, then confirm that your auth config still uses the intended database adapter.",[238,456,457,458,462,463,258],{},"See ",[459,460,461],"a",{"href":88},"Use a custom database"," or return to the ",[459,464,465],{"href":159},"error reference",[467,468,469],"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 .svFNh, html code.shiki .svFNh{--shiki-light:#383A42;--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 .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":221,"searchDepth":296,"depth":296,"links":471},[472,473,474],{"id":235,"depth":296,"text":236},{"id":243,"depth":296,"text":244},{"id":450,"depth":296,"text":451},"Restore an enabled module database provider after changing the provider registry.","md",null,{"editPath":479},"diagnostics\u002Fpages.ts",{"title":189},{"title":210,"description":475},"iQ94L90fWxui0R7umZKrhQI-oqPBRi-9JoMkTlgDpQw",[484,486],{"title":185,"path":186,"stem":187,"description":485,"children":-1},"Configure NuxtHub before Nuxt Better Auth so the hub:db alias is available.",{"title":193,"path":194,"stem":195,"description":487,"children":-1},"Resolve an underlying plugin, filesystem, or schema-generation error during Nuxt setup.",1789181451624]