fix mfa login after keycloak

This commit is contained in:
Danel Kungla
2025-10-04 17:36:36 +03:00
parent 7d90b5b910
commit 3f17b82fdb
5 changed files with 58 additions and 14 deletions

View File

@@ -46,8 +46,13 @@ export function MultiFactorChallengeContainer({
const router = useRouter();
const verifyMFAChallenge = useVerifyMFAChallenge({
onSuccess: () => {
router.replace(paths.redirectPath);
onSuccess: async () => {
try {
await fetch('/api/after-mfa', { method: 'POST' });
router.replace(paths.redirectPath);
} catch (err) {
// ignore
}
},
});