Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Authentication partially working (only email)

After months of developing a Web App under Firebase suddenly these days we have a problem with the Authentication, it returns this console.alert only with Facebook and google login (email/pass login works fine):

[firebase-auth] Info: The current domain is not authorized for OAuth operations. This will prevent signInWithPopup, signInWithRedirect, linkWithPopup and linkWithRedirect from working. Add your domain (front.qualify.mx) to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.

The App uses 3 different sub-domains, and in all 3 we can access over email/pass but not Facebook nor google. We tried updating the Firebase initialization script, nothing. We have checked the API keys (in the Google APIs Credentials) and there was a new "Server key (auto created by Google Service)" which no one told us it was generated (Jan. 18th), so we edited it to include the domains as the original API key in different ways (w/wo * and /*), nothing. We deleted this new Server Key, suddenly something different, now the console includes a 403 error before the alert stated above and returns auth/timeout code inside the object.

We also found the Identity Toolkit API has detected many errors, so we tried to add the URLs for login, logout and email, but nothing happens when trying to save.

What are we missing?

like image 441
DavidTaubmann Avatar asked Mar 10 '23 23:03

DavidTaubmann


1 Answers

The solution was adding my-app.firebaseapp.com (being my-app the unique identifier of our Firebase App) to the HTTP referrers in the Browser-Key Credentials from the Google APIs console and wait some time to propagate.

After many months of development the app never had a problem, and we are sure we never removed such referrer (if it was ever there).

Anyway... it's done and learned.

like image 110
DavidTaubmann Avatar answered Mar 21 '23 08:03

DavidTaubmann