fix and update
This commit is contained in:
@@ -86,10 +86,10 @@ export default function LoginPage() {
|
||||
const redirectAfterLogin =
|
||||
typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('redirect') : null;
|
||||
if (redirectAfterLogin && redirectAfterLogin.startsWith('/')) {
|
||||
router.push(redirectAfterLogin);
|
||||
router.replace(redirectAfterLogin);
|
||||
return;
|
||||
}
|
||||
router.push('/');
|
||||
router.replace('/');
|
||||
}, [router]);
|
||||
|
||||
const { identifyLogin, sendLoginOtp, verifyLoginOtp, loginWithPassword, loginWithLdap, beginTotpLogin, verifyTotpLogin, completePin, applyLoginAuth } = useAuth();
|
||||
@@ -195,11 +195,10 @@ export default function LoginPage() {
|
||||
|
||||
|
||||
function finishQrAuth(auth: AuthTokens) {
|
||||
|
||||
const resolved = applyLoginAuth(auth);
|
||||
|
||||
finishAuth(resolved.pinVerified, resolved.sessionId);
|
||||
|
||||
void (async () => {
|
||||
const resolved = await applyLoginAuth(auth);
|
||||
finishAuth(resolved.pinVerified, resolved.sessionId);
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user