public class

PhoneAuthCredential

extends AuthCredential
java.lang.Object
   ↳ com.google.firebase.auth.AuthCredential
     ↳ com.google.firebase.auth.PhoneAuthCredential

Class Overview

Wraps phone number and verification information for authentication purposes.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<PhoneAuthCredential> CREATOR
Public Methods
String getProvider()
Returns the unique string identifier for the provider type with which the credential is associated.
String getSmsCode()
Gets the auto-retrieved SMS verification code if applicable.
[Expand]
Inherited Methods
From class com.google.firebase.auth.AuthCredential
From class java.lang.Object
From interface android.os.Parcelable

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.

Returns
String

public String getSmsCode ()

Gets the auto-retrieved SMS verification code if applicable. When SMS verification is used, you will be called back first via onCodeSent(String, PhoneAuthProvider.ForceResendingToken), and later 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 onVerificationCompleted(PhoneAuthCredential), then SMS code can be null.

Returns
String