PhoneAuthCredential
public class PhoneAuthCredential extends AuthCredential implements Cloneable
| java.lang.Object | ||
| ↳ | com.google.firebase.auth.AuthCredential | |
| ↳ | com.google.firebase.auth.PhoneAuthCredential |
Wraps phone number and verification information for authentication purposes.
Summary
Constants |
|
|---|---|
static final Parcelable.Creator<PhoneAuthCredential> |
Public methods |
|
|---|---|
@NonNull String |
Returns the unique string identifier for the provider type with which the credential is associated. |
@NonNull String |
Returns the unique string identifier for the sign in method with which the credential is associated. |
@Nullable String |
Gets the auto-retrieved SMS verification code if applicable. |
Inherited Constants |
||||
|---|---|---|---|---|
|
Inherited methods |
||
|---|---|---|
|
Constants
Public methods
getProvider
public @NonNull String getProvider()
Returns the unique string identifier for the provider type with which the credential is associated.
getSignInMethod
public @NonNull String getSignInMethod()
Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by fetchSignInMethodsForEmail after this user has signed in with this type of credential.
getSmsCode
public @Nullable String getSmsCode()
Gets the auto-retrieved SMS verification code if applicable. When SMS verification is used, you will be called back first via onCodeSent, and later onVerificationCompleted with a 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 onVerificationCompleted, then SMS code can be null.