EmailAuthCredential class

Interface that represents the credentials returned byEmailAuthProvider forProviderId.PASSWORD

Covers bothSignInMethod.EMAIL_PASSWORD andSignInMethod.EMAIL_LINK.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend theEmailAuthCredential class.

Signature:

exportdeclareclassEmailAuthCredentialextendsAuthCredential

Extends:AuthCredential

Methods

MethodModifiersDescription
fromJSON(json)staticStatic method to deserialize a JSON representation of an object into anAuthCredential.
toJSON()Returns a JSON-serializable representation of this object.

EmailAuthCredential.fromJSON()

Static method to deserialize a JSON representation of an object into anAuthCredential.

Signature:

staticfromJSON(json:object|string):EmailAuthCredential|null;

Parameters

ParameterTypeDescription
jsonobject | stringEitherobject or the stringified representation of the object. When string is provided,JSON.parse would be called first.

Returns:

EmailAuthCredential | null

If the JSON input does not represent anAuthCredential, null is returned.

EmailAuthCredential.toJSON()

Returns a JSON-serializable representation of this object.

Signature:

toJSON():object;

Returns:

object

a JSON-serializable representation of this object.

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 2024-01-19 UTC.