Back to Firebase Js Sdk

EmailAuthCredential class

docs-devsite/auth.emailauthcredential.md

12.12.12.4 KB
Original Source

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.

<b>Signature:</b>

typescript
export declare class EmailAuthCredential extends AuthCredential 

<b>Extends:</b> AuthCredential

Methods

MethodModifiersDescription
fromJSON(json)<code>static</code>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<!-- -->.

<b>Signature:</b>

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

Parameters

ParameterTypeDescription
jsonobject | stringEither <code>object</code> or the stringified representation of the object. When string is provided, <code>JSON.parse</code> would be called first.

<b>Returns:</b>

EmailAuthCredential | null

If the JSON input does not represent an AuthCredential<!-- -->, null is returned.

EmailAuthCredential.toJSON()

Returns a JSON-serializable representation of this object.

<b>Signature:</b>

typescript
toJSON(): object;

<b>Returns:</b>

object

a JSON-serializable representation of this object.