EmailAuthProvider

classEmailAuthProvider


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

Summary

Constants

constString!

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

constString!

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

constString!
PROVIDER_ID = "password"

Unique string identifier for this provider type.

Public functions

java-staticAuthCredential
getCredential(email: String, password: String)

Returns a new instance ofAuthCredential that wraps a given email and password.

java-staticAuthCredential
getCredentialWithLink(email: String, emailLink: String)

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

Constants

EMAIL_LINK_SIGN_IN_METHOD

const val EMAIL_LINK_SIGN_IN_METHOD = "emailLink": String!

Unique string identifier for email/link sign-in method. Indicates the signin methodssignInWithEmailLink andsignInWithCredential with anEmailAuthCredential generated bygetCredentialWithLink.

EMAIL_PASSWORD_SIGN_IN_METHOD

const val EMAIL_PASSWORD_SIGN_IN_METHOD = "password": String!

Unique string identifier for email/password sign-in method. Indicates the signin methodssignInWithEmailAndPassword andsignInWithCredential with anEmailAuthCredential generated bygetCredential.

PROVIDER_ID

const val PROVIDER_ID = "password": String!

Unique string identifier for this provider type.

Public functions

getCredential

java-static fun getCredential(email: String, password: String): AuthCredential

Returns a new instance ofAuthCredential that wraps a given email and password. Used when callingsignInWithCredential orlinkWithCredential.

getCredentialWithLink

java-static fun getCredentialWithLink(email: String, emailLink: String): AuthCredential

Returns a new instance ofAuthCredential that wraps an email sign-in link. Used when callingsignInWithCredential orlinkWithCredential.

Exceptions
Parameters
email: String

the email to which theemailLink was sent

emailLink: String

a link generated bysendSignInLinkToEmail

Returns
AuthCredential

anAuthCredential that wraps the givenemail andemailLink. Used when callingsignInWithCredential,linkWithCredential, orreauthenticate.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.