Home > @firebase/auth > EmailAuthCredential > fromJSON
EmailAuthCredential.fromJSON() method
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.