fix callback for password, passkey

This commit is contained in:
peintnermax
2023-08-30 17:06:27 +02:00
parent 5da274cecf
commit e475418ce1
3 changed files with 36 additions and 5 deletions

View File

@@ -153,8 +153,20 @@ export default function LoginPasskey({
userHandle: coerceToBase64Url(userHandle, "userHandle"),
},
};
return submitLogin(data).then(() => {
return router.push(`/accounts`);
return submitLogin(data).then((resp) => {
return router.push(
`/signedin?` +
new URLSearchParams(
authRequestId
? {
loginName: resp.factors.user.loginName,
authRequestId,
}
: {
loginName: resp.factors.user.loginName,
}
)
);
});
} else {
setLoading(false);

View File

@@ -76,7 +76,19 @@ export default function PasswordForm({
})
);
} else {
return router.push(`/accounts`);
return router.push(
`/signedin?` +
new URLSearchParams(
authRequestId
? {
loginName: resp.factors.user.loginName,
authRequestId,
}
: {
loginName: resp.factors.user.loginName,
}
)
);
}
});
}