Skip to content

Commit

Permalink
Use client-side-compatible uuid generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sd109 committed Sep 2, 2024
1 parent 909b7c7 commit ae0e80e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/app/auth/login/HeaderLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down

0 comments on commit ae0e80e

Please sign in to comment.