Complete the code to initialize Firebase Authentication with Google provider.
const provider = new firebase.auth.[1]();The GoogleAuthProvider is used to enable Google sign-in in Firebase Authentication.
Complete the code to trigger the Google sign-in popup.
firebase.auth().signInWith[1](provider).then(result => { console.log(result.user); });The signInWithPopup method opens a popup window for Google sign-in.
Fix the error in the code to correctly handle sign-in errors.
firebase.auth().signInWithPopup(provider).catch(error => { console.log(error.[1]); });The error object has a message property that contains the error description.
Fill both blanks to create a user object with display name and email from the sign-in result.
const user = { name: result.user.[1], email: result.user.[2] };The displayName and email properties hold the user's name and email address.
Fill all three blanks to sign out the user and log a confirmation message.
firebase.auth().[1]().then(() => { console.log('[2]'); }).catch(error => { console.log(error.[3]); });
signOut() signs out the user. The success message confirms sign-out. Errors are logged using the message property.
