fix and update

This commit is contained in:
lendry
2026-07-01 14:34:55 +03:00
parent 55deb5c152
commit 0c9b8e2629
6 changed files with 137 additions and 19 deletions

View File

@@ -83,6 +83,12 @@ export default function LoginPage() {
const router = useRouter();
const finishLoginRedirect = useCallback(() => {
if (typeof window !== 'undefined') {
const fedcmLoginApi = (navigator as Navigator & { login?: { setStatus?: (status: string) => void } }).login;
if (window.opener && typeof fedcmLoginApi?.setStatus === 'function') {
return;
}
}
const redirectAfterLogin =
typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('redirect') : null;
if (redirectAfterLogin && redirectAfterLogin.startsWith('/')) {