@nuxtjs/better-auth 0.3.8 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtjs/better-auth",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "configKey": "auth",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
2
2
  import { mkdir, writeFile } from 'node:fs/promises';
3
- import { getLayerDirectories, resolveServerVariant, hasNuxtCompatibility, updateTemplates, addServerImports, addServerHandler, addNitroPlugin, addImports, addPlugin, addComponentsDir, addRouteMiddleware, extendPages, addTemplate, hasNuxtModule, addTypeTemplate, defineNuxtModule, createResolver, getNitroVersion } from '@nuxt/kit';
3
+ import { getLayerDirectories, resolveServerVariant, hasNuxtCompatibility, hasNuxtModuleCompatibility, updateTemplates, addServerImports, addServerHandler, addNitroPlugin, addImports, addPlugin, addComponentsDir, addRouteMiddleware, extendPages, addTemplate, hasNuxtModule, addTypeTemplate, defineNuxtModule, createResolver, getNitroVersion } from '@nuxt/kit';
4
4
  import { consola as consola$1 } from 'consola';
5
5
  import { defineDiagnostics, Diagnostic, formatDiagnostic } from 'nostics';
6
6
  import { isAbsolute, join, resolve, relative, dirname } from 'pathe';
@@ -13,7 +13,7 @@ import { isCI, isTest } from 'std-env';
13
13
  import { isInternalAssetPath } from '../dist/runtime/internal/auth-route-rules.js';
14
14
  export { defineClientAuth, defineServerAuth } from '../dist/runtime/config.js';
15
15
 
16
- const version = "0.3.8";
16
+ const version = "0.3.10";
17
17
 
18
18
  const CONFIG_EXTENSIONS = [".ts", ".js", ".mts", ".cts", ".mjs", ".cjs"];
19
19
  const CONFIG_EXTENSION_RE = /\.[cm]?[jt]s$/;
@@ -152,6 +152,17 @@ function resolveAuthPluginSources(nuxt) {
152
152
  return resolved;
153
153
  }
154
154
 
155
+ function exportedNames(declaration) {
156
+ const names = /* @__PURE__ */ new Set();
157
+ for (const [, specifiers] of declaration.matchAll(/\bexport\s+(?:type\s+)?\{([^}]*)\}/g)) {
158
+ for (const specifier of specifiers.split(",")) {
159
+ const name = specifier.trim().replace(/^type\s+/, "").split(/\s+as\s+/).pop()?.trim();
160
+ if (name)
161
+ names.add(name);
162
+ }
163
+ }
164
+ return names;
165
+ }
155
166
  function selectNitro3RouteRulesTarget(nitroTypesDeclaration, resolveH3Rules) {
156
167
  if (/\binterface\s+NitroRouteConfig\b/.test(nitroTypesDeclaration)) {
157
168
  return {
@@ -160,6 +171,14 @@ function selectNitro3RouteRulesTarget(nitroTypesDeclaration, resolveH3Rules) {
160
171
  rulesInterface: "NitroRouteRules"
161
172
  };
162
173
  }
174
+ const exported = exportedNames(nitroTypesDeclaration);
175
+ if (exported.has("RouteRuleConfig") && exported.has("RouteRules")) {
176
+ return {
177
+ moduleName: "nitro/types",
178
+ configInterface: "RouteRuleConfig",
179
+ rulesInterface: "RouteRules"
180
+ };
181
+ }
163
182
  return {
164
183
  moduleName: resolveH3Rules(),
165
184
  configInterface: "RouteRuleConfig",
@@ -208,6 +227,9 @@ function resolveServerRuntimeShim(resolve) {
208
227
  function resolveH3TypesPath(nitroMajor) {
209
228
  return nitroMajor === 3 ? "nitro/h3" : "h3";
210
229
  }
230
+ function resolveServerImportsTypesFile(nitroMajor) {
231
+ return nitroMajor === 3 ? "server-imports.d.ts" : "nitro-imports.d.ts";
232
+ }
211
233
  async function resolveAppSecretShim(resolve) {
212
234
  const canDeriveAppSecret = await hasNuxtCompatibility({ nuxt: ">=4.6.0-0" });
213
235
  return resolve(`./runtime/server/internal/${canDeriveAppSecret ? "app-secret" : "app-secret-unavailable"}`);
@@ -273,8 +295,22 @@ const diagnostics = defineDiagnostics({
273
295
  }
274
296
  });
275
297
 
276
- function setupDevTools(nuxt) {
298
+ async function setupDevTools(nuxt) {
277
299
  const hookable = nuxt;
300
+ if (await hasNuxtModuleCompatibility("@nuxt/devtools", ">=4.0.0-alpha.8", nuxt)) {
301
+ hookable.hook("devtools:ready", (ctx) => {
302
+ ctx.docks.register({
303
+ id: "better-auth",
304
+ title: "Auth",
305
+ icon: "simple-icons:betterauth",
306
+ type: "iframe",
307
+ url: "/__better-auth-devtools",
308
+ groupId: "nuxt",
309
+ category: "server"
310
+ });
311
+ });
312
+ return;
313
+ }
278
314
  hookable.hook("devtools:customTabs", (tabs) => {
279
315
  tabs.push({
280
316
  category: "server",
@@ -342,12 +378,12 @@ function registerAuthMiddleware(resolve) {
342
378
  });
343
379
  }
344
380
  function registerPrepareTypesHook(input) {
345
- const { nuxt, serverDir, hasHubDb } = input;
381
+ const { nuxt, serverDir, hasHubDb, serverImportsTypesFile } = input;
346
382
  nuxt.hook("prepare:types", ({ nodeTsConfig, nodeReferences, sharedReferences }) => {
347
383
  nodeTsConfig.compilerOptions ||= {};
348
384
  nodeTsConfig.compilerOptions.paths ||= {};
349
385
  const projectReferenceTypePaths = [
350
- join(nuxt.options.buildDir, "types/nitro-imports.d.ts"),
386
+ join(nuxt.options.buildDir, "types", serverImportsTypesFile),
351
387
  join(nuxt.options.buildDir, "types/auth-database.d.ts")
352
388
  ];
353
389
  if (hasHubDb)
@@ -394,7 +430,7 @@ async function registerDevtools(input) {
394
430
  const isProduction = process.env.NODE_ENV === "production" || !nuxt.options.dev;
395
431
  if (isProduction || clientOnly)
396
432
  return;
397
- setupDevTools(nuxt);
433
+ await setupDevTools(nuxt);
398
434
  addServerHandler({ route: "/api/_better-auth/config", method: "get", handler: resolve("./runtime/server/api/_better-auth/config.get") });
399
435
  if (hasHubDb) {
400
436
  const handlers = [
@@ -1209,7 +1245,7 @@ function buildNuxtFetchFallback(name) {
1209
1245
  `).join("");
1210
1246
  }
1211
1247
  function registerServerTypeTemplates(input) {
1212
- const { serverConfigPath, hasHubDb, runtimeTypesPath, sharedServerConfigSafe, h3TypesPath, nitro3RouteRulesTarget } = input;
1248
+ const { serverConfigPath, hasHubDb, runtimeTypesPath, sharedServerConfigSafe, h3TypesPath, serverImportsTypesFile, nitro3RouteRulesTarget } = input;
1213
1249
  const fetchRoutingTypeDeclarations = h3TypesPath === "nitro/h3" ? `type NitroFetchRequest = string & {}
1214
1250
  type AvailableRouterMethod<_ReqT extends NitroFetchRequest> = 'get' | 'head' | 'patch' | 'post' | 'put' | 'delete' | 'connect' | 'options' | 'trace'` : `import type { AvailableRouterMethod, NitroFetchRequest } from 'nitropack/types'`;
1215
1251
  const resolvedNitro3RouteRulesTarget = nitro3RouteRulesTarget ?? {
@@ -1232,7 +1268,7 @@ type AvailableRouterMethod<_ReqT extends NitroFetchRequest> = 'get' | 'head' | '
1232
1268
  auth?: import('${runtimeTypesPath}').AuthMeta
1233
1269
  }
1234
1270
  }`).join("\n");
1235
- const serverConfigTypeTemplateOptions = sharedServerConfigSafe ? { nuxt: true, nitro: true, node: true, shared: true } : { nuxt: true, nitro: true, node: true };
1271
+ const serverConfigTypeTemplateOptions = sharedServerConfigSafe || h3TypesPath === "nitro/h3" ? { nuxt: true, nitro: true, node: true, shared: true } : { nuxt: true, nitro: true, node: true };
1236
1272
  addTypeTemplate({
1237
1273
  filename: "types/auth-database.d.ts",
1238
1274
  getContents: () => `
@@ -1246,7 +1282,7 @@ declare module '#auth/database' {
1246
1282
  addTypeTemplate({
1247
1283
  filename: "types/nuxt-better-auth-server-context.d.ts",
1248
1284
  getContents: () => `
1249
- /// <reference path="./nitro-imports.d.ts" />
1285
+ /// <reference path="./${serverImportsTypesFile}" />
1250
1286
  /// <reference path="./auth-database.d.ts" />
1251
1287
  ${hasHubDb ? '/// <reference path="../hub/db.d.ts" />' : ""}
1252
1288
 
@@ -1694,7 +1730,9 @@ const module$1 = defineNuxtModule({
1694
1730
  setup(options, nuxt) {
1695
1731
  const finishSetup = async () => {
1696
1732
  const resolver = createResolver(import.meta.url);
1697
- const h3TypesPath = resolveH3TypesPath(getNitroVersion(nuxt));
1733
+ const nitroMajor = getNitroVersion(nuxt);
1734
+ const h3TypesPath = resolveH3TypesPath(nitroMajor);
1735
+ const serverImportsTypesFile = resolveServerImportsTypesFile(nitroMajor);
1698
1736
  nuxt.options.alias["#better-auth/nitro-compat"] = resolveServerRuntimeShim(resolver.resolve);
1699
1737
  nuxt.options.alias["#better-auth/app-secret"] = await resolveAppSecretShim(resolver.resolve);
1700
1738
  const registeredPluginSources = {};
@@ -1758,7 +1796,8 @@ const module$1 = defineNuxtModule({
1758
1796
  registerPrepareTypesHook({
1759
1797
  nuxt,
1760
1798
  serverDir: setup.prepareTypes.serverDir,
1761
- hasHubDb: setup.prepareTypes.hasHubDb
1799
+ hasHubDb: setup.prepareTypes.hasHubDb,
1800
+ serverImportsTypesFile
1762
1801
  });
1763
1802
  }
1764
1803
  if (setup.database.providerDefinition) {
@@ -1783,6 +1822,7 @@ const module$1 = defineNuxtModule({
1783
1822
  runtimeTypesPath: resolver.resolve("./runtime/types"),
1784
1823
  sharedServerConfigSafe: [setup.configs.server.path, ...setup.pluginSources.server].every(isServerConfigSharedTypeSafe),
1785
1824
  h3TypesPath,
1825
+ serverImportsTypesFile,
1786
1826
  nitro3RouteRulesTarget: h3TypesPath === "nitro/h3" ? resolveNitro3RouteRulesTarget(nuxt.options.rootDir) : void 0
1787
1827
  });
1788
1828
  }
@@ -31,6 +31,8 @@ export default defineNuxtRouteMiddleware(async (to) => {
31
31
  if (auth === void 0 || auth === false)
32
32
  return;
33
33
  const config = useRuntimeConfig().public.auth;
34
+ if (import.meta.server && config?.clientOnly)
35
+ return;
34
36
  const { fetchSession, user, loggedIn } = useUserSession();
35
37
  const mode = typeof auth === "string" ? auth : auth?.only ?? "user";
36
38
  const redirectTo = typeof auth === "object" ? auth.redirectTo : void 0;
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
- import { useFetch, useRuntimeConfig } from "#imports";
2
+ import { useFetch, useHead, useRuntimeConfig } from "#imports";
3
3
  import { useDevtoolsClient } from "@nuxt/devtools-kit/iframe-client";
4
- import { computed, ref, watch, watchEffect } from "vue";
4
+ import { computed, onBeforeUnmount, onMounted, ref, shallowRef, triggerRef, watch } from "vue";
5
5
  const pageSize = 20;
6
6
  const tabLabels = {
7
7
  sessions: "Sessions",
@@ -10,13 +10,23 @@ const tabLabels = {
10
10
  config: "Config"
11
11
  };
12
12
  const devtoolsClient = useDevtoolsClient();
13
+ const nativeHost = shallowRef();
14
+ let stopHostUpdates;
15
+ onMounted(() => {
16
+ if (window.parent === window)
17
+ return;
18
+ try {
19
+ nativeHost.value = window.parent.__NUXT_DEVTOOLS_HOST__;
20
+ } catch {
21
+ return;
22
+ }
23
+ stopHostUpdates = nativeHost.value?.hooks.hook("host:update:reactivity", () => triggerRef(nativeHost));
24
+ });
25
+ onBeforeUnmount(() => stopHostUpdates?.());
13
26
  const runtimeConfig = useRuntimeConfig();
14
27
  const hasDb = computed(() => runtimeConfig.public.auth?.useDatabase ?? false);
15
- const isDark = computed(() => devtoolsClient.value?.host?.app?.colorMode?.value === "dark");
16
- watchEffect(() => {
17
- if (import.meta.client)
18
- document.documentElement.classList.toggle("dark", isDark.value);
19
- });
28
+ const isDark = computed(() => (nativeHost.value ?? devtoolsClient.value?.host)?.app?.colorMode?.value === "dark");
29
+ useHead({ style: [{ key: "better-auth-devtools-body", textContent: "body { margin: 0 !important; }" }] });
20
30
  const activeTab = ref(hasDb.value ? "sessions" : "config");
21
31
  const tabs = computed(() => hasDb.value ? ["sessions", "users", "accounts", "config"] : ["config"]);
22
32
  watch(hasDb, (enabled) => {
@@ -125,7 +135,7 @@ async function deleteConfirmedSession() {
125
135
  </script>
126
136
 
127
137
  <template>
128
- <div class="devtools-shell">
138
+ <div class="devtools-shell" :class="{ dark: isDark }">
129
139
  <header class="devtools-header">
130
140
  <div class="brand">
131
141
  <svg width="60" height="45" viewBox="0 0 60 45" fill="none" class="brand-mark" xmlns="http://www.w3.org/2000/svg">
@@ -375,6 +385,6 @@ async function deleteConfirmedSession() {
375
385
  </div>
376
386
  </template>
377
387
 
378
- <style>
379
- :root{--ba-bg:#fff;--ba-fg:#1f1f1f;--ba-muted:#707070;--ba-border:#e5e5e5;--ba-soft:#f7f7f7;--ba-hover:#efefef;--ba-good:#047857;--ba-bad:#b91c1c}.dark{--ba-bg:#111;--ba-fg:#f4f4f5;--ba-muted:#a1a1aa;--ba-border:#2d2d2d;--ba-soft:#191919;--ba-hover:#242424;--ba-good:#34d399;--ba-bad:#f87171}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}.devtools-shell{background:var(--ba-bg);color:var(--ba-fg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;min-height:100vh}.devtools-header{border-bottom:1px solid var(--ba-border);gap:16px;justify-content:space-between;min-height:48px;padding:0 16px}.actions,.brand,.confirm,.devtools-header,.links,.pagination,.toolbar,.toolbar-meta{align-items:center;display:flex}.brand{font-weight:600;gap:10px}.brand-mark{height:auto;width:24px}.links a{color:var(--ba-muted);padding:8px 10px;text-decoration:none}.links a:hover{color:var(--ba-fg)}.tabs{border-bottom:1px solid var(--ba-border);display:flex;gap:4px;padding:8px 12px 0}.actions button,.confirm button,.pagination button,.tabs button,.toolbar button{background:transparent;border:1px solid var(--ba-border);color:var(--ba-fg);cursor:pointer;min-height:30px;padding:5px 10px}.tabs button{border-bottom:0}.tabs button.active,button:hover:not(:disabled){background:var(--ba-hover)}button:disabled{color:var(--ba-muted);cursor:default}button.danger{color:var(--ba-bad)}.panel{padding:16px}.section{display:grid;gap:14px}.toolbar{gap:12px;justify-content:space-between}.actions,.confirm,.pagination,.toolbar-meta{gap:8px}input{background:var(--ba-bg);border:1px solid var(--ba-border);color:var(--ba-fg);padding:7px 10px;width:min(340px,100%)}table{border:1px solid var(--ba-border);border-collapse:collapse;width:100%}td,th{border-bottom:1px solid var(--ba-border);padding:9px 10px;text-align:left;vertical-align:top}th{background:var(--ba-soft);font-weight:500}td small,th{color:var(--ba-muted)}td small{display:block;margin-top:3px}code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.badge{background:var(--ba-soft);border:1px solid var(--ba-border);color:var(--ba-muted);display:inline-flex;padding:2px 8px}.badge.good{color:var(--ba-good)}.badge.bad,.error{color:var(--ba-bad)}.confirm,.empty,.notice{background:var(--ba-soft);border:1px solid var(--ba-border);padding:10px 12px}.empty,.notice{color:var(--ba-muted)}.config-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.config-grid .error,.config-grid .toolbar{grid-column:1/-1}article{background:var(--ba-soft);border:1px solid var(--ba-border)}h2{border-bottom:1px solid var(--ba-border);font-size:13px;padding:10px 12px}h2,pre{margin:0}pre{font-size:12px;line-height:1.5;overflow:auto;padding:12px}.capitalize{text-transform:capitalize}@media (max-width:720px){.devtools-header,.toolbar,.toolbar-meta{align-items:stretch;flex-direction:column}.actions,.tabs{flex-wrap:wrap}table{display:block;overflow-x:auto}}
388
+ <style scoped>
389
+ .devtools-shell{--ba-bg:#fff;--ba-fg:#1f1f1f;--ba-muted:#707070;--ba-border:#e5e5e5;--ba-soft:#f7f7f7;--ba-hover:#efefef;--ba-good:#047857;--ba-bad:#b91c1c}.devtools-shell.dark{--ba-bg:#111;--ba-fg:#f4f4f5;--ba-muted:#a1a1aa;--ba-border:#2d2d2d;--ba-soft:#191919;--ba-hover:#242424;--ba-good:#34d399;--ba-bad:#f87171}*{box-sizing:border-box}button,input{font:inherit}.devtools-shell{background:var(--ba-bg);color:var(--ba-fg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;min-height:100vh}.devtools-header{border-bottom:1px solid var(--ba-border);gap:16px;justify-content:space-between;min-height:48px;padding:0 16px}.actions,.brand,.confirm,.devtools-header,.links,.pagination,.toolbar,.toolbar-meta{align-items:center;display:flex}.brand{font-weight:600;gap:10px}.brand-mark{height:auto;width:24px}.links a{color:var(--ba-muted);padding:8px 10px;text-decoration:none}.links a:hover{color:var(--ba-fg)}.tabs{border-bottom:1px solid var(--ba-border);display:flex;gap:4px;padding:8px 12px 0}.actions button,.confirm button,.pagination button,.tabs button,.toolbar button{background:transparent;border:1px solid var(--ba-border);color:var(--ba-fg);cursor:pointer;min-height:30px;padding:5px 10px}.tabs button{border-bottom:0}.tabs button.active,button:hover:not(:disabled){background:var(--ba-hover)}button:disabled{color:var(--ba-muted);cursor:default}button.danger{color:var(--ba-bad)}.panel{padding:16px}.section{display:grid;gap:14px}.toolbar{gap:12px;justify-content:space-between}.actions,.confirm,.pagination,.toolbar-meta{gap:8px}input{background:var(--ba-bg);border:1px solid var(--ba-border);color:var(--ba-fg);padding:7px 10px;width:min(340px,100%)}table{border:1px solid var(--ba-border);border-collapse:collapse;width:100%}td,th{border-bottom:1px solid var(--ba-border);padding:9px 10px;text-align:left;vertical-align:top}th{background:var(--ba-soft);font-weight:500}td small,th{color:var(--ba-muted)}td small{display:block;margin-top:3px}code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.badge{background:var(--ba-soft);border:1px solid var(--ba-border);color:var(--ba-muted);display:inline-flex;padding:2px 8px}.badge.good{color:var(--ba-good)}.badge.bad,.error{color:var(--ba-bad)}.confirm,.empty,.notice{background:var(--ba-soft);border:1px solid var(--ba-border);padding:10px 12px}.empty,.notice{color:var(--ba-muted)}.config-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.config-grid .error,.config-grid .toolbar{grid-column:1/-1}article{background:var(--ba-soft);border:1px solid var(--ba-border)}h2{border-bottom:1px solid var(--ba-border);font-size:13px;padding:10px 12px}h2,pre{margin:0}pre{font-size:12px;line-height:1.5;overflow:auto;padding:12px}.capitalize{text-transform:capitalize}@media (max-width:720px){.devtools-header,.toolbar,.toolbar-meta{align-items:stretch;flex-direction:column}.actions,.tabs{flex-wrap:wrap}table{display:block;overflow-x:auto}}
380
390
  </style>
@@ -1,10 +1,9 @@
1
1
  import type { H3Event } from 'h3';
2
2
  import type { AuthRouteRules } from '../../types.js';
3
- import { splitSetCookieString } from 'cookie-es';
4
3
  import { defineEventHandler, getQuery, getRequestHost, getRequestProtocol, getRequestURL, readBody, toWebRequest } from 'h3';
5
4
  import { useRuntimeConfig } from 'nitropack/runtime';
6
5
  export { defineEventHandler, getQuery, getRequestHost, getRequestProtocol, getRequestURL, readBody, toWebRequest, useRuntimeConfig, };
7
6
  export type ServerEvent = H3Event;
8
- export { splitSetCookieString as splitCookiesString };
7
+ export declare function splitCookiesString(cookiesString: string | string[]): string[];
9
8
  export declare function getAuthRouteRules(event: ServerEvent): AuthRouteRules;
10
9
  export declare function createAuthError(status: number, statusText: string): Error;
@@ -20,7 +20,9 @@ export {
20
20
  toWebRequest,
21
21
  useRuntimeConfig
22
22
  };
23
- export { splitSetCookieString as splitCookiesString };
23
+ export function splitCookiesString(cookiesString) {
24
+ return splitSetCookieString(cookiesString);
25
+ }
24
26
  export function getAuthRouteRules(event) {
25
27
  return getRouteRules(event);
26
28
  }
@@ -1,10 +1,9 @@
1
1
  import type { RequestEvent } from 'nuxt/server';
2
2
  import type { AuthRouteRules } from '../../types.js';
3
- import { splitSetCookieString } from 'cookie-es';
4
3
  import { defineEventHandler, getQuery, getRequestHost, getRequestProtocol, getRequestURL, readBody, useRuntimeConfig } from 'nuxt/server';
5
4
  export { defineEventHandler, getQuery, getRequestHost, getRequestProtocol, getRequestURL, readBody, useRuntimeConfig, };
6
5
  export type ServerEvent = RequestEvent;
7
- export { splitSetCookieString as splitCookiesString };
6
+ export declare function splitCookiesString(cookiesString: string | string[]): string[];
8
7
  export declare function getAuthRouteRules(event: ServerEvent): AuthRouteRules;
9
8
  export declare function createAuthError(status: number, statusText: string): Error;
10
9
  export declare function toWebRequest(event: ServerEvent): Request;
@@ -20,7 +20,9 @@ export {
20
20
  readBody,
21
21
  useRuntimeConfig
22
22
  };
23
- export { splitSetCookieString as splitCookiesString };
23
+ export function splitCookiesString(cookiesString) {
24
+ return splitSetCookieString(cookiesString);
25
+ }
24
26
  export function getAuthRouteRules(event) {
25
27
  const rules = getRouteRules(event);
26
28
  return { auth: normalizeAuthRouteRule(rules.auth) };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/better-auth",
3
3
  "type": "module",
4
- "version": "0.3.8",
4
+ "version": "0.3.10",
5
5
  "description": "Nuxt module for Better Auth integration with NuxtHub, route protection, session management, and role-based access",
6
6
  "author": "onmax",
7
7
  "license": "MIT",
@@ -108,7 +108,7 @@
108
108
  "drizzle-kit": "^0.31.10",
109
109
  "drizzle-orm": "^0.45.2",
110
110
  "eslint": "^10.8.1",
111
- "happy-dom": "^20.8.9",
111
+ "happy-dom": "^21.0.0",
112
112
  "nitropack": "2.13.4",
113
113
  "nuxt": "^4.6.0",
114
114
  "pinia": "^4.0.3",