September 2019
Beginner
512 pages
12h 52m
English
The first stage of phone authentication is when the server (Firebase, in our case) sends a verification code through SMS to the phone number the user entered.
This is done by using the Firebase SDK method called verifyPhoneNumber, which requests the server to start a phone authentication as shown here:
// _sendVerificationCode method (LoginPageState) login_page.dartvoid _sendVerificationCode() async { final PhoneCodeSent codeSent = (String verId, [int forceCodeResend]) { _verificationId = verId; _goToVerificationStep(); }; final PhoneVerificationCompleted verificationSuccess = (FirebaseUser user) { _loggedIn(); }; final PhoneVerificationFailed verificationFail = (AuthException exception) { goBackToFirstStep(); }; ...Read now
Unlock full access