nuxt-auther 1.2.5 → 1.2.6

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.5",
3
+ "version": "1.2.6",
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.5";
10
+ const version = "1.2.6";
11
11
 
12
12
  const OAUTH2DEFAULTS = {
13
13
  accessType: void 0,
@@ -240,10 +240,10 @@ function assignAbsoluteEndpoints(strategy) {
240
240
  }
241
241
  function authorizeGrant(opt) {
242
242
  return `import { defineEventHandler, readBody, createError, getCookie } from 'h3'
243
- // @ts-expect-error: virtual file
243
+ // @ts-expect-error: virtual file
244
+ import { config } from '#nuxt-auth-options'
244
245
  import { serialize } from 'cookie-es'
245
246
 
246
- const config = useRuntimeConfig().auth
247
247
  const options = ${serialize(opt, { space: 4 })}
248
248
 
249
249
  function addTokenPrefix(token, tokenType) {
@@ -352,9 +352,9 @@ export default defineEventHandler(async (event) => {
352
352
  function localAuthorizeGrant(opt) {
353
353
  return `import { defineEventHandler, readBody, createError, getCookie, getRequestHeader } from 'h3'
354
354
  // @ts-expect-error: virtual file
355
+ import { config } from '#nuxt-auth-options'
355
356
  import { serialize } from 'cookie-es'
356
357
 
357
- const config = useRuntimeConfig().auth
358
358
  const options = ${serialize(opt, { space: 4 })}
359
359
 
360
360
  function addTokenPrefix(token, tokenType) {
@@ -956,12 +956,6 @@ 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
- );
965
959
  const { strategies, strategyScheme } = await resolveStrategies(nuxt, options);
966
960
  delete options.strategies;
967
961
  const uniqueImports = /* @__PURE__ */ new Set();
@@ -100,10 +100,10 @@ export function assignAbsoluteEndpoints(strategy) {
100
100
  }
101
101
  export function authorizeGrant(opt) {
102
102
  return `import { defineEventHandler, readBody, createError, getCookie } from 'h3'
103
- // @ts-expect-error: virtual file
103
+ // @ts-expect-error: virtual file
104
+ import { config } from '#nuxt-auth-options'
104
105
  import { serialize } from 'cookie-es'
105
106
 
106
- const config = useRuntimeConfig().auth
107
107
  const options = ${serialize(opt, { space: 4 })}
108
108
 
109
109
  function addTokenPrefix(token, tokenType) {
@@ -212,9 +212,9 @@ export default defineEventHandler(async (event) => {
212
212
  export function localAuthorizeGrant(opt) {
213
213
  return `import { defineEventHandler, readBody, createError, getCookie, getRequestHeader } from 'h3'
214
214
  // @ts-expect-error: virtual file
215
+ import { config } from '#nuxt-auth-options'
215
216
  import { serialize } from 'cookie-es'
216
217
 
217
- const config = useRuntimeConfig().auth
218
218
  const options = ${serialize(opt, { space: 4 })}
219
219
 
220
220
  function addTokenPrefix(token, tokenType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-auther",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Authentication module for Nuxt.JS",
5
5
  "homepage": "https://github.com/zerosdev/nuxt-auther",
6
6
  "author": "zerosdev",