Facebook Login Auth with Firebase

I’m trying to enable Facebook Auth Login and this’s been driving me nuts.

It keeps showing me this error:

Here’s my Firebase and Facebook Dev settings. I’ve added the App ID + App secret to Firebase, and the OAuth redirect URI to Facebook.


image

I thought it’s because I hadn’t added the app domain, but I tried it any nothing’s changed:

I also tried deploying it (in case it was an HTTPS error, and I’m using http://localhost on dev) but that also did nothing. I don’t know what else to try.

Here’s my code, although I don’t think that’s not where the problem lies.

  • did you try googling about this as well?
  • maybe try removing current “fb app” and then “re-create” this, that helps sometimes :slight_smile:
  • have you tried any other “login method” likes of “google/github”?! if so, do they work fine?

happy coding :slight_smile:

  • I did google and went on StackOverflow a bit before posting, but this particular thing seems to specific, because I didnt find any similar posts.
  • I tried recreating the Facebook app multiple times beforehand, no result.
  • Google and Github were easy, that’s why I’m surprised that I’ve been stuck at Facebook for a day :sweat_smile:

I finally got it to work (partially)!

Turns out accessing a Facebook app is NOT straightforward. To make it accessible to everyone, I have to manually publish it (it’s in dev mode by default), which requires me to create a Business Account, verify it with documents and whatnot, which is just too many hoops for me to jump through for a practice site :joy:

While in dev mode, the app is only accessible to accounts that I specifically added to App Roles:

And by default even the Administrator (the account that I created this app with) can’t access it (wtf?), hence the Sorry, something went wrong message.

So I had to add a spare account to the Testers part, log in that account instead of the Admin, now I finally got through this excruciatingly annoying part and saw something other than an error message:

This has been a draining experience :joy:, and I’m glad I got through it.

I was having the same issue today, and I found a better solution that don’t require you to switch your app into Live mode.

When creating your app, make sure to choose ‘Other’ when asked what you want it to do. Then, click ‘Next’.

When prompted to select an App type, choose ‘None’. Then, click ‘Next’.

Once you are on the App Dashboard, you will see an option to setup the Facebook Login product. Click on that and setup the product.

After you’ve done that, you will be able to access Products > Facebook Login > Settings on the sidebar. From there, you can add the OAuth redirect URI from your Firebase app. You can then also grab the App ID and App Secret from the app Settings > Basic page.

If you create your app in this way, you will also be able to switch your app into Live mode. Just make sure you enter a Privacy URL for your app. Although, based on my testing, even on Development mode, other Facebook accounts can Sign in with Facebook on my Firebase app just fine.

Bitmap
The OP got it. Per Facebook’s instructions, you have to set up users with app roles in order for them to be able to use FB login.

Please ID is long lock

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.