fix and update

This commit is contained in:
lendry
2026-06-29 14:40:35 +03:00
parent 75ccbe5fc4
commit 0df7240dc8
21 changed files with 934 additions and 113 deletions

View File

@@ -22,7 +22,8 @@ import {
PublicUser,
refreshAuthSession,
resetPinRequiredNotification,
setPinRequiredHandler
setPinRequiredHandler,
syncFedcmSession
} from '@/lib/api';
import { useToast } from './toast-provider';
import { PinLockModal } from './pin-lock-modal';
@@ -89,6 +90,10 @@ function applySessionState(
setters.activatePinLock(session.sessionId ?? '');
} else {
setters.clearPinLock();
const accessToken = window.localStorage.getItem(AUTH_TOKEN_KEY);
if (accessToken) {
void syncFedcmSession(accessToken);
}
}
}
@@ -154,6 +159,9 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
cacheUserProfile(auth.user);
setHasStoredSession(true);
clearPinLock();
if (auth.pinVerified !== false) {
void syncFedcmSession(auth.accessToken);
}
},
[clearPinLock]
);