This guide will help you configure Facebook for your Firebase Auth app.
You will be required to provide a redirect URI, the URI should be similar to: https://my-app-12345.firebaseapp.com/__/auth/handler
You only need to change the project name in the beginning of the URI.
- Register in the Facebook Developer portal. You may be asked to provide a valid cell phone number to complete your registration.
- Once registered, locate a drop-down list in the top right and click on it. At the middle it will be an option to
Add a New App
. - You will be presented with 4 options, select
Website
(even if you are developing an Android or iOS app). We can later add the other platforms when we are ready for deployment. - Click the button that says
Skip and Create App ID
. A form will appear where you have to provide your app details, once finished click theCreate App ID
button.
- You will be redirected to your
Dashboard
, click theGet Started
button next to theFacebook Login
option. - Configure the OAuth settings similar to the next image. Remember to set the correct redirect URI and press the
Save Changes
button.
- Click
Settings
in the left side menu. You will be presented with a screen with yourApp ID
andApp Secret
, you will be required to provide your Facebook password to see theApp Secret
. - Once authorized, copy down your
App ID
andApp Secret
. We are going to use them in a later step.
At this point the Facebook API will only work with your own Facebook Account, in order for it to work on any account you need to switch your app status from development
to public
.
-
If you are still in the
Dashboard
click theApp Review
option in the left side menu. -
In the
Make [Your App Name] public?
section turn it toYes
. A pop-up will appear asking if you want to make your app public, click theConfirm
button.
With these settings your app will only be allowed to do reading operations with the Facebook API. If you want to do writing operations such as Liking
and posting to the user wall you must submit your app for review.
- Go back to the Firebase console and select your project.
- Click the
Auth
option in the left side menu. - Click the
SIGN-IN METHOD
button in the top menu and then selectFacebook
from the providers list. - Click the
Enable
toggle button and set it toon
, you will be asked for theApp ID
andApp Secret
. - Once you have finished filling the form press the
Save
button.
The Facebook provider has been successfully enabled and configured.