@zvonimirsun/iszy-nuxt-auth-layer 0.1.2 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvonimirsun/iszy-nuxt-auth-layer",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "ISZY Nuxt 应用共享认证 layer。",
@@ -42,7 +42,7 @@
42
42
  "@pinia/nuxt": "0.11.3",
43
43
  "@types/ms": "^2.1.0",
44
44
  "@types/node": "^25.9.1",
45
- "nuxt": "^4.4.7",
45
+ "nuxt": "^4.4.8",
46
46
  "pinia": "^3.0.4",
47
47
  "typescript": "^6.0.3",
48
48
  "vue-tsc": "^3.3.3"
@@ -9,7 +9,7 @@ export default defineEventHandler(async (event) => {
9
9
  method: 'POST',
10
10
  })
11
11
  const code = res.data!
12
- const state = random()
12
+ const state = randomState()
13
13
 
14
14
  await setState(state, {
15
15
  isBind: true,
@@ -2,7 +2,7 @@ export default defineEventHandler(async (event) => {
2
2
  const { apiOrigin } = usePublicConfig()
3
3
  const { provider } = event.context.params as { provider: string }
4
4
  const url = getRequestURL(event)
5
- const state = random()
5
+ const state = randomState()
6
6
 
7
7
  await setState(state, {})
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { randomBytes } from 'node:crypto'
2
2
 
3
- export function random(size = 16) {
3
+ export function randomState(size = 16) {
4
4
  return randomBytes(size).toString('hex').slice(0, size)
5
5
  }