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

2

6

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.

Leatriceleave answered 8/2, 2017 at 17:30 Comment(5)
Have you listed your own domain in the Facebook app settings?Suomi
I hadn't. I tried adding wfolly.firebaseapp.com and debatenomasafp.org now but got this error message: "App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains: debatenomasafp.org, wfolly.firebaseapp.com". Problem persists with or without https://(...)/ .Leatriceleave
What does "does not work" mean? Where's the offending code and the error? See how to ask and creating an mcve.Bearce
"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.Leatriceleave
Not being able to see your name could be a UI problem. You need to narrow the scope here to a specific problem. See the links I shared. If auth is failiing, there is almost certainly an error message being generated that you should log and share here.Bearce
L
13

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".

Leatriceleave answered 9/2, 2017 at 14:20 Comment(1)
I faced this problem too. what can I do to fix it?Foggia
V
4

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

Authorized Domains

Vega answered 6/11, 2019 at 22:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.