fix and update

This commit is contained in:
lendry
2026-07-07 08:06:55 +03:00
parent 28b04ada81
commit 9ca5071f1a
8 changed files with 152 additions and 20 deletions

View File

@@ -45,3 +45,11 @@ export async function finalizeFedcmLogin(accessToken: string) {
export function shouldFinalizeFedcmLogin(pathname: string) {
return pathname.startsWith('/auth/login');
}
export function isFedcmLoginPopup() {
if (typeof window === 'undefined') return false;
if (window.opener) return true;
if (window.IdentityProvider?.close) return true;
const params = new URLSearchParams(window.location.search);
return params.get('fedcm') === '1';
}