PhoneAuthCredential

public class PhoneAuthCredential extends AuthCredential implements Cloneable


Wraps phone number and verification information for authentication purposes.

Summary

Public fields

@Nullable String

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

From android.os.Parcelable
static final int
static final int
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int
int

Constants

CREATOR

public static final Parcelable.Creator<PhoneAuthCredentialCREATOR

Public fields

smsCode

public @Nullable String smsCode

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.