Replies: 1 comment 4 replies
-
@samhorlbeck any thought? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Raising this as discussion initially since I'm not 100% sure this is unique to alpha, but that's where I'm seeing it.
Environment
Problem (and solution?)
I'm getting
auth/popup-blocked
errors usingsignInWithPopup
withGoogleAuthProvider
on Safari (mac desktop, not private) and I've traced it down to this:firebase-js-sdk/packages-exp/auth-exp/src/platform_browser/popup_redirect.ts
Line 91 in e8811c0
The first time
originValidation
is called it fetches project config with an API call (identitytoolkit
,GET v1/projects
) - apparently for no other reason than to throw with a helpful message if origins are improperly configured.The delay caused by this fetch, which is before the popup is opened, causes the popup to become disassociated from the user interaction that triggered it. This causes the popup to be blocked by Safari and quite possibly others. Ideally there should be no asynchronous operations between user "click" and popup opening.
There doesn't seem to be any public API to pre-warm this project config or skip domain validation (which seems sensible in production anyway). Commenting out that line fixes the issue with no ill effects I can see.
Beta Was this translation helpful? Give feedback.
All reactions