global update and global fix

This commit is contained in:
lendry
2026-06-25 23:48:57 +03:00
parent 3880c68d59
commit b0ea87e898
121 changed files with 13759 additions and 663 deletions

View File

@@ -82,6 +82,16 @@ export default function LoginPage() {
const router = useRouter();
const finishLoginRedirect = useCallback(() => {
const redirectAfterLogin =
typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('redirect') : null;
if (redirectAfterLogin && redirectAfterLogin.startsWith('/')) {
router.push(redirectAfterLogin);
return;
}
router.push('/');
}, [router]);
const { identifyLogin, sendLoginOtp, verifyLoginOtp, loginWithPassword, loginWithLdap, beginTotpLogin, verifyTotpLogin, completePin, applyLoginAuth } = useAuth();
const { showToast } = useToast();
@@ -174,7 +184,7 @@ export default function LoginPage() {
} else {
router.push('/');
finishLoginRedirect();
}
@@ -596,7 +606,7 @@ export default function LoginPage() {
await completePin(pendingSessionId, pin);
router.push('/');
finishLoginRedirect();
} catch (error) {