From ae0e80e17e8827c726775bba797d2cacbcee2c07 Mon Sep 17 00:00:00 2001 From: sd109 Date: Mon, 2 Sep 2024 20:38:06 +0100 Subject: [PATCH] Use client-side-compatible uuid generator --- web/src/app/auth/login/HeaderLogin.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/app/auth/login/HeaderLogin.tsx b/web/src/app/auth/login/HeaderLogin.tsx index eb2d6b5c570..6b8f9d7fcf4 100644 --- a/web/src/app/auth/login/HeaderLogin.tsx +++ b/web/src/app/auth/login/HeaderLogin.tsx @@ -5,6 +5,7 @@ import { basicLogin, basicSignup } from "@/lib/user"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; import { Spinner } from "@/components/Spinner"; +import { v4 as uuidv4 } from 'uuid'; export function HeaderLoginLoading({ user, groups @@ -17,7 +18,7 @@ export function HeaderLoginLoading({ const router = useRouter(); const { popup, setPopup } = usePopup(); const email = `${user}@default.com`; - const password = `not-used-${window.crypto.randomUUID()}` + const password = `not-used-${uuidv4()}` const role = groups.includes("/admins") ? "admin" : "basic" async function tryLogin() {