mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 08:57:33 +00:00
use uuid on the serverside
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
"*": "prettier --write --ignore-unknown"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fingerprintjs/fingerprintjs": "^4.6.1",
|
||||
"@headlessui/react": "^2.1.9",
|
||||
"@heroicons/react": "2.1.3",
|
||||
"@tailwindcss/forms": "0.5.7",
|
||||
@@ -57,7 +56,8 @@
|
||||
"react-dom": "19.0.0",
|
||||
"react-hook-form": "7.39.5",
|
||||
"swr": "^2.2.0",
|
||||
"tinycolor2": "1.4.2"
|
||||
"tinycolor2": "1.4.2",
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.46.0",
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import FingerprintJS from "@fingerprintjs/fingerprintjs";
|
||||
import { create } from "@zitadel/client";
|
||||
import {
|
||||
UserAgent,
|
||||
@@ -6,11 +5,10 @@ import {
|
||||
} from "@zitadel/proto/zitadel/session/v2/session_pb";
|
||||
import { cookies, headers } from "next/headers";
|
||||
import { userAgent } from "next/server";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export async function getFingerprintId() {
|
||||
const fp = await FingerprintJS.load();
|
||||
const result = await fp.get();
|
||||
return result.visitorId;
|
||||
return uuidv4();
|
||||
}
|
||||
|
||||
export async function setFingerprintIdCookie(fingerprintId: string) {
|
||||
|
19
pnpm-lock.yaml
generated
19
pnpm-lock.yaml
generated
@@ -74,9 +74,6 @@ importers:
|
||||
|
||||
apps/login:
|
||||
dependencies:
|
||||
'@fingerprintjs/fingerprintjs':
|
||||
specifier: ^4.6.1
|
||||
version: 4.6.1
|
||||
'@headlessui/react':
|
||||
specifier: ^2.1.9
|
||||
version: 2.1.9(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
@@ -140,6 +137,9 @@ importers:
|
||||
tinycolor2:
|
||||
specifier: 1.4.2
|
||||
version: 1.4.2
|
||||
uuid:
|
||||
specifier: ^11.1.0
|
||||
version: 11.1.0
|
||||
devDependencies:
|
||||
'@bufbuild/buf':
|
||||
specifier: ^1.46.0
|
||||
@@ -917,9 +917,6 @@ packages:
|
||||
resolution: {integrity: sha512-ulqQu4KMr1/sTFIYvqSdegHT8NIkt66tFAkugGnHA+1WAfEn6hMzNR+svjXGFRVLnapxvej67Z/LwchFrnLBUg==}
|
||||
engines: {node: '>=18.0.0', npm: '>=9.0.0'}
|
||||
|
||||
'@fingerprintjs/fingerprintjs@4.6.1':
|
||||
resolution: {integrity: sha512-62TPnX6fXXMlxS7SOR3DJWEOKab7rCALwSWkuKWYMRrnsZ/jD9Ju4CUyy9VWDUYuhQ2ZW1RGLwOZJXTXR6K1pg==}
|
||||
|
||||
'@floating-ui/core@1.6.8':
|
||||
resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==}
|
||||
|
||||
@@ -4644,6 +4641,10 @@ packages:
|
||||
util-deprecate@1.0.2:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
|
||||
uuid@11.1.0:
|
||||
resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==}
|
||||
hasBin: true
|
||||
|
||||
uuid@8.3.2:
|
||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||
hasBin: true
|
||||
@@ -5435,10 +5436,6 @@ snapshots:
|
||||
|
||||
'@faker-js/faker@9.2.0': {}
|
||||
|
||||
'@fingerprintjs/fingerprintjs@4.6.1':
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
|
||||
'@floating-ui/core@1.6.8':
|
||||
dependencies:
|
||||
'@floating-ui/utils': 0.2.8
|
||||
@@ -9393,6 +9390,8 @@ snapshots:
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
uuid@11.1.0: {}
|
||||
|
||||
uuid@8.3.2: {}
|
||||
|
||||
verror@1.10.0:
|
||||
|
Reference in New Issue
Block a user