- By now, your console is well configured. Let's add some logic from the Facebook login button to the Firebase authentication API call:
Figure 9: Basic application - adding a Facebook OAuth button
- Next, let's hook our button with an event listener and introduce the logic behind the Firebase Facebook sign-in method:
let facebookLogin = document.getElementById('fcbLogin'); facebookLogin.addEventListener('click', () => { //TODO HERE : ADD LOGIC }, false);
- Before we call the authentication Firebase function, we need to configure the authentication provider, as the following code shows: ...