This commit is contained in:
David Nguyen
2025-02-12 16:41:35 +11:00
parent 548d92c2fc
commit 15922d447b
70 changed files with 889 additions and 551 deletions

View File

@ -97,7 +97,7 @@ export const SignInForm = ({
const [isPasskeyLoading, setIsPasskeyLoading] = useState(false);
const redirectUrl = useMemo(() => {
const redirectPath = useMemo(() => {
// Handle SSR
if (typeof window === 'undefined') {
return LOGIN_REDIRECT_PATH;
@ -171,7 +171,7 @@ export const SignInForm = ({
await authClient.passkey.signIn({
credential: JSON.stringify(credential),
csrfToken: sessionId,
redirectUrl,
redirectPath,
});
} catch (err) {
setIsPasskeyLoading(false);
@ -211,7 +211,7 @@ export const SignInForm = ({
password,
totpCode,
backupCode,
redirectUrl,
redirectPath,
});
} catch (err) {
console.log(err);