Merge branch 'dev' into feat/internal-user-passkey-support

This commit is contained in:
Adrian Astles 2025-07-14 07:20:33 +08:00 committed by GitHub
commit c9f5ffae42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 2522 additions and 367 deletions

View file

@ -210,6 +210,12 @@ export default function LoginForm({ redirect, onLogin, idps }: LoginFormProps) {
return;
}
if (data?.twoFactorSetupRequired) {
const setupUrl = `/auth/2fa/setup?email=${encodeURIComponent(email)}${redirect ? `&redirect=${encodeURIComponent(redirect)}` : ''}`;
router.push(setupUrl);
return;
}
if (onLogin) {
await onLogin();
}