fix and update
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
subscribeApiReady,
|
||||
subscribeApiNotReady,
|
||||
} from '@/lib/api';
|
||||
import { finalizeFedcmLogin, shouldFinalizeFedcmLogin } from '@/lib/fedcm-login-bridge';
|
||||
import { useToast } from './toast-provider';
|
||||
import { PinLockModal } from './pin-lock-modal';
|
||||
import { AppBootstrapScreen } from './app-bootstrap-screen';
|
||||
@@ -254,7 +255,11 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
|
||||
});
|
||||
|
||||
if (auth.pinVerified !== false) {
|
||||
scheduleFedcmSessionSync(auth.accessToken, 8000);
|
||||
if (typeof window !== 'undefined' && shouldFinalizeFedcmLogin(window.location.pathname)) {
|
||||
void finalizeFedcmLogin(auth.accessToken);
|
||||
} else {
|
||||
scheduleFedcmSessionSync(auth.accessToken, 8000);
|
||||
}
|
||||
}
|
||||
},
|
||||
[activatePinLock, clearPinLock, showToast]
|
||||
|
||||
Reference in New Issue
Block a user