Files
firebase-js-sdk/docs-devsite/auth.emailauthcredential.md
Mark DuckworthandGitHub 017073ed9b Fix documentation links for function overloads and improve readability of function headings (#7864)
* Support function links to function overloads.

* Improve readability of headings for functions.
2023-12-15 16:17:10 -07:00

2.4 KiB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

EmailAuthCredential class

Interface that represents the credentials returned by EmailAuthProvider for ProviderId.PASSWORD

Covers both SignInMethod.EMAIL_PASSWORD and SignInMethod.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 the EmailAuthCredential class.

Signature:

export declare class EmailAuthCredential extends AuthCredential 

Extends: AuthCredential

Methods

Method Modifiers Description
fromJSON(json) static Static method to deserialize a JSON representation of an object into an AuthCredential.
toJSON() Returns a JSON-serializable representation of this object.

EmailAuthCredential.fromJSON()

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

Signature:

static fromJSON(json: object | string): EmailAuthCredential | null;

Parameters

Parameter Type Description
json object | string Either object 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 an AuthCredential, 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.