[{"data":1,"prerenderedAt":381,"buildId":382},["ShallowReactive",2],{"-errors-nuxt-auth-schema-storage-required":3,"-errors-nuxt-auth-schema-storage-required-surround":164,"navigation_docs":175},{"id":4,"title":5,"body":6,"description":153,"extension":154,"links":155,"meta":156,"navigation":158,"path":160,"seo":161,"stem":162,"__hash__":163},"docs\u002F6.errors\u002Fnuxt-auth-schema-storage-required.md","NUXT_AUTH_SCHEMA_STORAGE_REQUIRED: Custom session storage is missing",{"type":7,"value":8,"toc":148},"minimark",[9,27,32,36,40,43,46,104,123,127,130,144],[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_SCHEMA_STORAGE_REQUIRED] hubSecondaryStorage: \"custom\" requires secondaryStorage in defineServerAuth() to omit the session table from the generated schema.\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",{},"The schema generator was asked to omit the session table with hubSecondaryStorage: \"custom\", but defineServerAuth() did not provide secondaryStorage. Development warns and retains the session table; production setup fails.",[28,37,39],{"id":38},"how-to-fix-it","How to fix it",[33,41,42],{},"Provide an atomic secondaryStorage in defineServerAuth(), or set auth.hubSecondaryStorage to false to keep database-backed sessions.",[33,44,45],{},"If you want database-backed sessions, keep the session table:",[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","export default defineNuxtConfig({\n  auth: { hubSecondaryStorage: false },\n})\n","nuxt.config.ts","ts",[18,53,54,72,98],{"__ignoreMap":16},[21,55,56,60,64,68],{"class":23,"line":24},[21,57,59],{"class":58},"sqe1H","export",[21,61,63],{"class":62},"sKg8T"," default",[21,65,67],{"class":66},"sfT9l"," defineNuxtConfig",[21,69,71],{"class":70},"s17Py","({\n",[21,73,75,79,83,86,89,91,95],{"class":23,"line":74},2,[21,76,78],{"class":77},"sYvLG","  auth",[21,80,82],{"class":81},"sVnqq",":",[21,84,85],{"class":70}," { ",[21,87,88],{"class":77},"hubSecondaryStorage",[21,90,82],{"class":81},[21,92,94],{"class":93},"s3ZNE"," false",[21,96,97],{"class":70}," },\n",[21,99,101],{"class":23,"line":100},3,[21,102,103],{"class":70},"})\n",[33,105,106,107,110,111,114,115,118,119,122],{},"If you intend to use custom session storage, keep ",[18,108,109],{},"'custom'"," and supply a Better Auth secondary store with atomic ",[18,112,113],{},"getAndDelete"," and ",[18,116,117],{},"increment"," operations in ",[18,120,121],{},"defineServerAuth()",". Review the generated schema before applying a migration that changes session storage.",[28,124,126],{"id":125},"verify-the-fix","Verify the fix",[33,128,129],{},"Regenerate the schema. With hubSecondaryStorage: false, confirm the session table is present before creating a database migration.",[33,131,132,133,138,139,143],{},"See ",[134,135,137],"a",{"href":136},"\u002Fgetting-started\u002Fconfiguration","Configure secondary storage"," or return to the ",[134,140,142],{"href":141},"\u002Ferrors","error reference",".",[145,146,147],"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 .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 .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 .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":16,"searchDepth":74,"depth":74,"links":149},[150,151,152],{"id":30,"depth":74,"text":31},{"id":38,"depth":74,"text":39},{"id":125,"depth":74,"text":126},"Provide secondaryStorage or retain the session table when generating the auth schema.","md",null,{"editPath":157},"diagnostics\u002Fpages.ts",{"title":159},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required",{"title":5,"description":153},"6.errors\u002Fnuxt-auth-schema-storage-required","rE2ObSYXN17DBeLtMrva0FFVEBl-9SJilAPQz5ebXx0",[165,170],{"title":166,"path":167,"stem":168,"description":169,"children":-1},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed","Resolve an underlying plugin, filesystem, or schema-generation error during Nuxt setup.",{"title":171,"path":172,"stem":173,"description":174,"children":-1},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only","Remove server secondary-storage configuration from an app that only connects to an external auth server.",[176,213,239,286,311,332],{"title":177,"path":178,"stem":179,"children":180,"icon":183},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[181,184,189,193,198,203,208],{"title":182,"path":178,"stem":179,"icon":183},"Introduction","i-lucide-sparkles",{"title":185,"path":186,"stem":187,"icon":188},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":190,"path":136,"stem":191,"icon":192},"Configuration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":194,"path":195,"stem":196,"icon":197},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":199,"path":200,"stem":201,"icon":202},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":204,"path":205,"stem":206,"icon":207},"Schema Generation (NuxtHub)","\u002Fgetting-started\u002Fschema-generation","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":209,"path":210,"stem":211,"icon":212},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":214,"path":215,"stem":216,"children":217,"page":238},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[218,222,226,230,234],{"title":219,"path":220,"stem":221},"serverAuth()","\u002Fcore-concepts\u002Fserver-auth","2.core-concepts\u002F1.server-auth",{"title":223,"path":224,"stem":225},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":227,"path":228,"stem":229},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":231,"path":232,"stem":233},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":235,"path":236,"stem":237},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":240,"path":241,"stem":242,"children":243,"page":238},"Guides","\u002Fguides","3.guides",[244,248,253,257,261,265,270,274,278,282],{"title":245,"path":246,"stem":247},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":249,"path":250,"stem":251,"icon":252},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":254,"path":255,"stem":256},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":258,"path":259,"stem":260},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":262,"path":263,"stem":264},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":266,"path":267,"stem":268,"icon":269},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":271,"path":272,"stem":273},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":275,"path":276,"stem":277},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":279,"path":280,"stem":281},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":283,"path":284,"stem":285},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":287,"path":288,"stem":289,"children":290,"page":238},"Integrations","\u002Fintegrations","4.integrations",[291,295,299,303,307],{"title":292,"path":293,"stem":294},"NuxtHub","\u002Fintegrations\u002Fnuxthub","4.integrations\u002F1.nuxthub",{"title":296,"path":297,"stem":298},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":300,"path":301,"stem":302},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":304,"path":305,"stem":306},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":308,"path":309,"stem":310},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F5.mcp",{"title":312,"path":313,"stem":314,"children":315,"page":238},"API Reference","\u002Fapi","5.api",[316,320,324,328],{"title":317,"path":318,"stem":319},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":321,"path":322,"stem":323},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":325,"path":326,"stem":327},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":329,"path":330,"stem":331},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types",{"title":333,"path":141,"stem":334,"children":335,"icon":252},"Errors","6.errors\u002F0.index",[336,338,342,346,350,354,358,362,366,370,374,375,376,377],{"title":337,"path":141,"stem":334},"Overview",{"title":339,"path":340,"stem":341},"Better Auth CLI is not installed","\u002Ferrors\u002Fnuxt-auth-cli-missing","6.errors\u002Fnuxt-auth-cli-missing",{"title":343,"path":344,"stem":345},"Better Auth CLI version does not match better-auth","\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":347,"path":348,"stem":349},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed",{"title":351,"path":352,"stem":353},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema","6.errors\u002Fnuxt-auth-empty-schema",{"title":355,"path":356,"stem":357},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export",{"title":359,"path":360,"stem":361},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":363,"path":364,"stem":365},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config",{"title":367,"path":368,"stem":369},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":371,"path":372,"stem":373},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider",{"title":166,"path":167,"stem":168},{"title":159,"path":160,"stem":162},{"title":171,"path":172,"stem":173},{"title":378,"path":379,"stem":380},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",1796449719780,"4cf748c3-a3d8-45cf-988d-43df51faa3d5"]