firebase:: auth:: PhoneAuthProvider:: Listener
This is an abstract class.
#include <credential.h>
Receive callbacks from VerifyPhoneNumber events.
Summary
Please see PhoneAuthProvider for a sample implementation.
Constructors and Destructors |
|
---|---|
Listener()
|
|
~Listener()
|
Public functions |
|
---|---|
OnCodeAutoRetrievalTimeOut(const std::string & verification_id)
|
virtual void
The timeout specified in VerifyPhoneNumber has expired.
|
OnCodeSent(const std::string & verification_id, const ForceResendingToken & force_resending_token)
|
virtual void
SMS message with verification code sent to phone number.
|
OnVerificationCompleted(PhoneAuthCredential credential)=0
|
virtual void
Phone number auto-verification succeeded.
|
OnVerificationFailed(const std::string & error)=0
|
virtual void
Phone number verification failed with an error.
|
Public functions
Listener
Listener()
OnCodeAutoRetrievalTimeOut
virtual void OnCodeAutoRetrievalTimeOut( const std::string & verification_id )
The timeout specified in VerifyPhoneNumber has expired.
Called once auto_verify_time_out_ms
has passed. If using auto SMS retrieval, you can choose to block the UI (do not allow manual input of the verification code) until timeout is hit.
Details | |||
---|---|---|---|
Parameters |
|
OnCodeSent
virtual void OnCodeSent( const std::string & verification_id, const ForceResendingToken & force_resending_token )
SMS message with verification code sent to phone number.
Called immediately after Auth server sends a verification SMS. Once receiving this, you can allow users to manually input the verification code (even if you're also performing auto-verification). For user manual input case, get the SMS verification code from the user and then call GetCredential with the user's code.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnVerificationCompleted
virtual void OnVerificationCompleted( PhoneAuthCredential credential )=0
Phone number auto-verification succeeded.
Called when,
- auto-sms-retrieval has succeededflow (2) in PhoneAuthProvider
- instant validation has succeededflow (3) in PhoneAuthProvider
Details | |||
---|---|---|---|
Parameters |
|
OnVerificationFailed
virtual void OnVerificationFailed( const std::string & error )=0
Phone number verification failed with an error.
Called when and error occurred doing phone number authentication. For example,
- quota exceeded
- unknown phone number format
Details | |||
---|---|---|---|
Parameters |
|
~Listener
virtual ~Listener()