nuxt-auther 1.2.3 → 1.2.5

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": "nuxt-auther",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "configKey": "auth",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0 <5.0.0"
package/dist/module.mjs CHANGED
@@ -7,7 +7,7 @@ import { existsSync } from 'fs';
7
7
  import { hash } from 'ohash';
8
8
 
9
9
  const name = "nuxt-auther";
10
- const version = "1.2.3";
10
+ const version = "1.2.5";
11
11
 
12
12
  const OAUTH2DEFAULTS = {
13
13
  accessType: void 0,
@@ -330,7 +330,7 @@ export default defineEventHandler(async (event) => {
330
330
 
331
331
  const tokenCookieValue = response._data?.[options.strategy?.token?.property]
332
332
  if (config.stores.cookie.enabled && tokenCookieValue && options.strategy.token.httpOnly) {
333
- const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type) as string
333
+ const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type)
334
334
  const tokenCookie = serialize(tokenCookieName, token, { ...config.stores.cookie.options, httpOnly: true })
335
335
  cookies.push(tokenCookie);
336
336
  }
@@ -437,7 +437,7 @@ export default defineEventHandler(async (event) => {
437
437
 
438
438
  const tokenCookieValue = response._data?.[options.strategy?.token?.property]
439
439
  if (config.stores.cookie.enabled && tokenCookieValue && options.strategy.token.httpOnly) {
440
- const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type) as string
440
+ const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type)
441
441
  const tokenCookie = serialize(tokenCookieName, token, { ...config.stores.cookie.options, httpOnly: true })
442
442
  cookies.push(tokenCookie);
443
443
  }
@@ -956,6 +956,12 @@ const module = defineNuxtModule({
956
956
  const resolver = createResolver(import.meta.url);
957
957
  const runtime = resolver.resolve("runtime");
958
958
  const options = defu(nuxt.options.runtimeConfig[CONFIG_KEY], moduleOptions, moduleDefaults);
959
+ nuxt.options.runtimeConfig[CONFIG_KEY] = defu(
960
+ nuxt.options.runtimeConfig[CONFIG_KEY],
961
+ {
962
+ stores: options.stores
963
+ }
964
+ );
959
965
  const { strategies, strategyScheme } = await resolveStrategies(nuxt, options);
960
966
  delete options.strategies;
961
967
  const uniqueImports = /* @__PURE__ */ new Set();
@@ -190,7 +190,7 @@ export default defineEventHandler(async (event) => {
190
190
 
191
191
  const tokenCookieValue = response._data?.[options.strategy?.token?.property]
192
192
  if (config.stores.cookie.enabled && tokenCookieValue && options.strategy.token.httpOnly) {
193
- const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type) as string
193
+ const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type)
194
194
  const tokenCookie = serialize(tokenCookieName, token, { ...config.stores.cookie.options, httpOnly: true })
195
195
  cookies.push(tokenCookie);
196
196
  }
@@ -297,7 +297,7 @@ export default defineEventHandler(async (event) => {
297
297
 
298
298
  const tokenCookieValue = response._data?.[options.strategy?.token?.property]
299
299
  if (config.stores.cookie.enabled && tokenCookieValue && options.strategy.token.httpOnly) {
300
- const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type) as string
300
+ const token = addTokenPrefix(tokenCookieValue, options.strategy.token.type)
301
301
  const tokenCookie = serialize(tokenCookieName, token, { ...config.stores.cookie.options, httpOnly: true })
302
302
  cookies.push(tokenCookie);
303
303
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-auther",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Authentication module for Nuxt.JS",
5
5
  "homepage": "https://github.com/zerosdev/nuxt-auther",
6
6
  "author": "zerosdev",