Complete the code to initialize Firebase Authentication.
const auth = [1](app);The getAuth() method initializes the Firebase Authentication service.
Complete the code to enable Google sign-in provider.
const provider = new [1]();The GoogleAuthProvider class is used to enable Google sign-in.
Fix the error in the code to sign in with a popup using Google provider.
auth.[1](provider).then(result => {
console.log(result.user);
});signInWithPopup is the correct method to sign in using a popup window.
Fill both blanks to configure Facebook authentication and sign in with redirect.
const fbProvider = new [1](); auth.[2](fbProvider);
FacebookAuthProvider creates the Facebook provider instance, and signInWithRedirect starts sign-in with redirect.
Fill all three blanks to create an email/password user and handle errors.
auth.[1](email, password) .then(userCredential => { console.log(userCredential.user); }) .catch(error => { console.error(error.[2]); }); const email = '[3]';
createUserWithEmailAndPassword creates a new user. The error object has a message property. The email is a sample string.