fix and update
This commit is contained in:
@@ -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('/')) {
|
||||
|
||||
Reference in New Issue
Block a user