I'm using Firebase Authentication for my web app, and customizing the redirect domain for Firebase Authentication's Google Sign-In feature so that Google's authentication page will show Continue to: mydomain.io
,
I followed Firebase's documentation:
auth.mydomain.io
to the list of authorized domains in the Firebase consoleFirebase console authorized domains
https://auth.mydomain.io/__/auth/handler
const firebaseConfig = {
...
authDomain: "auth.mydomain.io",
...
}
Running my app locally, I can see my domain is properly linked to my app.
Login: Continue to mydomain.io
But, when I select a Google account to connect to, nothing happens. In the popup, I am redirected to auth.mydomain.io
with a blank page & an infinite loading bar at the top
EDIT: I also have the same problem using Facebook OAuth
After maybe 10 seconds the popup closes by itself and I get the following error in my local app console:
FirebaseError: Firebase: Error (auth/popup-closed-by-user).
at createErrorInternal (assert.ts:122:1)
at _createError (assert.ts:83:1)
at popup.ts:283:1
When I change the app's JavaScript configuration to myapp.firebaseapp.com
for the authDomain
property, it works fine and I can login with my google account
const firebaseConfig = {
...
authDomain: "myApp.firebaseapp.com",
...
}
Coming back with some good news. It now works perfectly, though I haven't changed anything. Give it 24h-48h if you are in the same situation I was.