Spaces:
Running

aditya-rAj19 commited on
Commit
bb3e953
Β·
1 Parent(s): e522792

Fix Control Panel Google sign-in inside the Hugging Face iframe

Browse files

On huggingface.co the Space runs in a cross-origin iframe. The popup is blocked
there, and the existing fallback called signInWithRedirect β€” which navigates
THIS frame to Google. Google refuses to be embedded and answers 403 ("you do not
have access to this document"), which is the error the Control Panel showed.

When framed we now never redirect. Instead the login card offers to reopen the
app in a top-level tab, where the normal popup flow works; the button is shown
up front while framed, not only after a failed attempt.

Also wires up getRedirectResult, which was exported from firebase.js but never
called. The non-framed redirect path could previously fail silently: you came
back from Google and just saw the login screen again with no error.

1 file changed +51 -7
frontend/src/pages/AdminPage.jsx+51-7