Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is authentication not working on own domain but working on firebase's domain?

If you go to https://wfolly.firebaseapp.com/, you'll be able to log in with Facebook by clicking "Iniciar sesion". You'll then see your name next to the log out text "Cerrar sesion - YOUR FACEBOOK NAME".

However, while auth works on wfolly.firebase.com above, it does not work on https://debatenomasafp.org/, my own domain connected through Firebase Hosting to Firebase's own wfolly.fire(...) URL.

"Does not work" means you won't see your name next to the log out text "Cerrar sesión", and generally won't be able to interact with the website as if you were logged in.

What is wrong? Why are they not behaving identically?

I know the deployment version is the same in both sites because the current deployment reflects a late change in both URLs, not just Firebase's.

Authentication also works fine on localhost:8080 pre-deployment.

It may or may not be relevant that I am using Re-Base (github.com/tylermcginnis/re-base) for authentication requests.

like image 624
Norbert Avatar asked Feb 08 '17 17:02

Norbert


Video Answer


2 Answers

Kato, in the comments above, gave me the answer through Slack.

I simply had to authorize the new domain in Firebase's console's "OAuth redirect domains" setting, under "Authentication".

like image 67
Norbert Avatar answered Sep 18 '22 06:09

Norbert


Just adding to the answer above. Thought an image would be helpful ;)

Authorized Domains

like image 44
TK421 Avatar answered Sep 18 '22 06:09

TK421