Firebase. Facebook sign-in method

You can let your users authenticate with Firebase using their Facebook accounts by integrating Facebook Login into your app. You can integrate Facebook Login either by using the Firebase SDK to carry out the sign-in flow, or by carrying out the Facebook Login flow manually and passing the resulting access token to Firebase.
First, we will need to add a new Application on our “Facebook for Developers” environment. If you have never done it before — no worries, I will guide you step by step.
1. Go to “Facebook for Developers” page
2. Click on “Get started” if you don't have an account:

3. Create your account:

4. Create an app:


5. Copy App ID
and App Secret
values…

…into Firebase Facebook sign-in method…


… and don’t forget to copy-paste OAuth redirect URI
to your Facebook Login app’s Valid OAuth Redirect URIs
settings:

And now we can use Facebook sign-in method in our Firebase application:
You can add additional scopes…
const facebookProvider = new firebase.auth.FacebookAuthProvider();
...
facebookProvider.addScope('email');
facebookProvider.addScope('user_birthday');
facebookProvider.addScope('user_friends');
...
… but note:



You can check Facebook permissions by this link:
Let’s test it out (gif)…


Nice!