Firebase Authentication 1 signs users in with a one-time SMS code. Enable the Phone provider in the console, then make three calls from firebase/auth (npm 2,036 i firebase, version 12): new RecaptchaVerifier(auth, 'sign-in-button', { size: 'invisible' }) to prove a human is asking, signInWithPhoneNumber(auth, '+15551234567', verifier) to send the code, and confirmationResult.confirm(code) to finish, which resolves with the signed-in user; the firebase.auth() style in older tutorials is the pre-modular API. Phone Auth is not on the no-cost Spark plan: Blaze bills every SMS sent. Use up to 10 fictional test numbers during development, and set an SMS region allowlist, because SMS pumping (bots requesting codes to costly destinations) is a common attack on these forms.
MENU
Firebase Phone Auth
Phone Authentication with Firebase