nuxt-auther 1.2.0 → 1.2.1
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 +1 -1
- package/dist/module.mjs +5 -1
- package/dist/utils/provider.mjs +4 -0
- package/package.json +2 -2
package/dist/module.json
CHANGED
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.
|
|
10
|
+
const version = "1.2.1";
|
|
11
11
|
|
|
12
12
|
const OAUTH2DEFAULTS = {
|
|
13
13
|
accessType: void 0,
|
|
@@ -320,6 +320,8 @@ export default defineEventHandler(async (event) => {
|
|
|
320
320
|
|
|
321
321
|
let cookies = event.node.res.getHeader('Set-Cookie') as string[] || [];
|
|
322
322
|
|
|
323
|
+
cookies = Array.isArray(cookies) ? cookies : cookies ? [cookies] : [];
|
|
324
|
+
|
|
323
325
|
const refreshCookieValue = response._data?.[options.strategy?.refreshToken?.property]
|
|
324
326
|
if (config.stores.cookie.enabled && refreshCookieValue && options.strategy.refreshToken.httpOnly) {
|
|
325
327
|
const refreshCookie = serialize(refreshCookieName, refreshCookieValue, { ...config.stores.cookie.options, httpOnly: true })
|
|
@@ -425,6 +427,8 @@ export default defineEventHandler(async (event) => {
|
|
|
425
427
|
|
|
426
428
|
let cookies = event.node.res.getHeader('Set-Cookie') as string[] || [];
|
|
427
429
|
|
|
430
|
+
cookies = Array.isArray(cookies) ? cookies : cookies ? [cookies] : [];
|
|
431
|
+
|
|
428
432
|
const refreshCookieValue = response._data?.[options.strategy?.refreshToken?.property]
|
|
429
433
|
if (config.stores.cookie.enabled && refreshCookieValue && options.strategy.refreshToken.httpOnly) {
|
|
430
434
|
const refreshCookie = serialize(refreshCookieName, refreshCookieValue, { ...config.stores.cookie.options, httpOnly: true })
|
package/dist/utils/provider.mjs
CHANGED
|
@@ -180,6 +180,8 @@ export default defineEventHandler(async (event) => {
|
|
|
180
180
|
|
|
181
181
|
let cookies = event.node.res.getHeader('Set-Cookie') as string[] || [];
|
|
182
182
|
|
|
183
|
+
cookies = Array.isArray(cookies) ? cookies : cookies ? [cookies] : [];
|
|
184
|
+
|
|
183
185
|
const refreshCookieValue = response._data?.[options.strategy?.refreshToken?.property]
|
|
184
186
|
if (config.stores.cookie.enabled && refreshCookieValue && options.strategy.refreshToken.httpOnly) {
|
|
185
187
|
const refreshCookie = serialize(refreshCookieName, refreshCookieValue, { ...config.stores.cookie.options, httpOnly: true })
|
|
@@ -285,6 +287,8 @@ export default defineEventHandler(async (event) => {
|
|
|
285
287
|
|
|
286
288
|
let cookies = event.node.res.getHeader('Set-Cookie') as string[] || [];
|
|
287
289
|
|
|
290
|
+
cookies = Array.isArray(cookies) ? cookies : cookies ? [cookies] : [];
|
|
291
|
+
|
|
288
292
|
const refreshCookieValue = response._data?.[options.strategy?.refreshToken?.property]
|
|
289
293
|
if (config.stores.cookie.enabled && refreshCookieValue && options.strategy.refreshToken.httpOnly) {
|
|
290
294
|
const refreshCookie = serialize(refreshCookieName, refreshCookieValue, { ...config.stores.cookie.options, httpOnly: true })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-auther",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Authentication module for Nuxt.JS",
|
|
5
5
|
"homepage": "https://github.com/zerosdev/nuxt-auther",
|
|
6
6
|
"author": "zerosdev",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
71
|
"packageManager": "yarn@4.9.2"
|
|
72
|
-
}
|
|
72
|
+
}
|