feat: implement one-time token

This commit is contained in:
2025-03-11 13:37:23 +01:00
parent 1067b12be8
commit 6eb2563068
3 changed files with 57 additions and 23 deletions

View File

@@ -63,9 +63,9 @@ export const SetPassword = () => {
if (!resp.ok) {
if (resp.status === 401) {
resp.statusText
? setError(resp.statusText)
: setError("unauthorized");
const { detail } = await resp.json();
if (detail) setError(detail);
else setError("unauthorized");
throw new Error("Unauthorized");
}
}