Represents the email and password authentication mechanism. Use this class to obtain
EmailAuthCredential
s.
Constant Summary
String | EMAIL_LINK_SIGN_IN_METHOD | Unique string identifier for email/link sign-in method. |
String | EMAIL_PASSWORD_SIGN_IN_METHOD | Unique string identifier for email/password sign-in method. |
String | PROVIDER_ID | Unique string identifier for this provider type. |
Public Method Summary
static AuthCredential |
getCredential(String email,
String
password)
Returns a new instance of
AuthCredential
that wraps a given email and password.
|
static AuthCredential |
getCredentialWithLink(String email,
String
emailLink)
Returns a new instance of
AuthCredential
that wraps an email sign-in link.
|
Inherited Method Summary
Constants
public static final String EMAIL_LINK_SIGN_IN_METHOD
Unique string identifier for email/link sign-in method. Indicates the signin methods
FirebaseAuth.signInWithEmailLink(String, String)
and
FirebaseAuth.signInWithCredential(AuthCredential)
with an EmailAuthCredential
generated by
getCredentialWithLink(String, String)
.
public static final String EMAIL_PASSWORD_SIGN_IN_METHOD
Unique string identifier for email/password sign-in method. Indicates the signin
methods
FirebaseAuth.signInWithEmailAndPassword(String, String)
and
FirebaseAuth.signInWithCredential(AuthCredential)
with an EmailAuthCredential
generated by
getCredential(String, String)
.
public static final String PROVIDER_ID
Unique string identifier for this provider type.
Public Methods
public static AuthCredential getCredential (String email, String password)
Returns a new instance of AuthCredential
that wraps a given email and password. Used when calling
FirebaseAuth.signInWithCredential(AuthCredential)
or
FirebaseUser.linkWithCredential(AuthCredential)
.
public static AuthCredential getCredentialWithLink (String email, String emailLink)
Returns a new instance of AuthCredential
that wraps an email sign-in link. Used when calling
FirebaseAuth.signInWithCredential(AuthCredential)
or
FirebaseUser.linkWithCredential(AuthCredential)
.
Exceptions
IllegalArgumentException
thrown if theemailLink
doesn't conform to the expectations checked inFirebaseAuth.isSignInWithEmailLink(String)
Parameters
the email to which the emailLink was sent |
|
emailLink | a link generated by
FirebaseAuth.sendSignInLinkToEmail(String, ActionCodeSettings) |
Returns
- an
AuthCredential
that wraps the givenemail
andemailLink
. Used when callingFirebaseAuth.signInWithCredential(AuthCredential)
,FirebaseUser.linkWithCredential(AuthCredential)
, orFirebaseUser.reauthenticate(AuthCredential)
.