EmailAuthProvider

public class EmailAuthProvider


Represents the email and password authentication mechanism. Use this class to obtain s.

Summary

Constants

static final String

Unique string identifier for email/link sign-in method.

static final String

Unique string identifier for email/password sign-in method.

static final String
PROVIDER_ID = "password"

Unique string identifier for this provider type.

Public methods

static @NonNull AuthCredential
getCredential(@NonNull String email, @NonNull String password)

Returns a new instance of AuthCredential that wraps a given email and password.

static @NonNull AuthCredential

Returns a new instance of AuthCredential that wraps an email sign-in link.

Constants

public static final String EMAIL_LINK_SIGN_IN_METHOD = "emailLink"

Unique string identifier for email/link sign-in method. Indicates the signin methods signInWithEmailLink and signInWithCredential with an EmailAuthCredential generated by getCredentialWithLink.

EMAIL_PASSWORD_SIGN_IN_METHOD

public static final String EMAIL_PASSWORD_SIGN_IN_METHOD = "password"

Unique string identifier for email/password sign-in method. Indicates the signin methods signInWithEmailAndPassword and signInWithCredential with an EmailAuthCredential generated by getCredential.

PROVIDER_ID

public static final String PROVIDER_ID = "password"

Unique string identifier for this provider type.

Public methods

getCredential

public static @NonNull AuthCredential getCredential(@NonNull String email, @NonNull String password)

Returns a new instance of AuthCredential that wraps a given email and password. Used when calling signInWithCredential or linkWithCredential.

getCredentialWithLink

public static @NonNull AuthCredential getCredentialWithLink(@NonNull String email, @NonNull String emailLink)

Returns a new instance of AuthCredential that wraps an email sign-in link. Used when calling signInWithCredential or linkWithCredential.

Exceptions
Parameters
@NonNull String email

the email to which the emailLink was sent

@NonNull String emailLink

a link generated by sendSignInLinkToEmail

Returns
@NonNull AuthCredential

an AuthCredential that wraps the given email and emailLink. Used when calling signInWithCredential, linkWithCredential, or reauthenticate.