EmailAuthProvider
public class EmailAuthProvider
Represents the email and password authentication mechanism. Use this class to obtain s.
Summary
Constants |
|
|---|---|
static final String |
EMAIL_LINK_SIGN_IN_METHOD = "emailLink"Unique string identifier for email/link sign-in method. |
static final String |
EMAIL_PASSWORD_SIGN_IN_METHOD = "password"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 |
static @NonNull AuthCredential |
getCredentialWithLink(@NonNull String email, @NonNull String emailLink)Returns a new instance of |
Constants
EMAIL_LINK_SIGN_IN_METHOD
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.
IllegalArgumentExceptionthrown if theemailLinkdoesn't conform to the expectations checked inisSignInWithEmailLink
| Parameters | |
|---|---|
@NonNull String email |
the email to which the |
@NonNull String emailLink |
a link generated by |
| Returns | |
|---|---|
@NonNull AuthCredential |
an |