Wraps phone number and verification information for authentication purposes.
Inherited Constant Summary
Field Summary
public static final Creator<PhoneAuthCredential> | CREATOR |
Public Method Summary
String |
getProvider()
Returns the unique string identifier for the provider type with which the
credential is associated.
|
String |
getSignInMethod()
Returns the unique string identifier for the sign in method with which the
credential is associated.
|
String |
getSmsCode()
Gets the auto-retrieved SMS verification code if applicable.
|
Inherited Method Summary
Fields
public static final Creator<PhoneAuthCredential> CREATOR
Public Methods
public String getProvider ()
Returns the unique string identifier for the provider type with which the credential is associated.
public String getSignInMethod ()
Returns the unique string identifier for the sign in method with which the
credential is associated. Should match that returned by
FirebaseAuth.fetchSignInMethodsForEmail(String)
after this user has signed
in with this type of credential.
public String getSmsCode ()
Gets the auto-retrieved SMS verification code if applicable. When SMS verification
is used, you will be called back first via
PhoneAuthProvider.OnVerificationStateChangedCallbacks.onCodeSent(String,
PhoneAuthProvider.ForceResendingToken)
, and later
PhoneAuthProvider.OnVerificationStateChangedCallbacks.onVerificationCompleted(PhoneAuthCredential)
with a PhoneAuthCredential
containing a non-null SMS code if auto-retrieval succeeded. If Firebase used another
approach to verify the phone number and triggers a callback via
PhoneAuthProvider.OnVerificationStateChangedCallbacks.onVerificationCompleted(PhoneAuthCredential)
,
then SMS code can be null
.