Complete the code to initialize Firebase phone authentication.
const auth = firebase.auth(); auth.[1]('+1234567890')
The signInWithPhoneNumber method starts phone number authentication.
Complete the code to confirm the verification code received by the user.
confirmationResult.[1](code).then((result) => {
const user = result.user;
});The confirm method verifies the code sent to the user's phone.
Fix the error in the code to set up reCAPTCHA verifier for phone authentication.
window.recaptchaVerifier = new firebase.auth.[1]('recaptcha-container');
The correct class to create a reCAPTCHA verifier is RecaptchaVerifier.
Fill both blanks to create a phone auth provider and send a verification code.
const phoneProvider = new firebase.auth.[1](); firebase.auth().[2]('+1234567890');
You create a PhoneAuthProvider instance, then call signInWithPhoneNumber to send the code.
Fill all three blanks to handle phone number sign-in with reCAPTCHA verifier.
window.recaptchaVerifier = new firebase.auth.[1]('recaptcha-container'); const phoneNumber = '+1234567890'; const appVerifier = window.[2]; firebase.auth().[3](phoneNumber, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; });
First, create a RecaptchaVerifier instance. Then get it from window.recaptchaVerifier. Finally, call signInWithPhoneNumber with the phone number and verifier.