voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 990 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [EmailAuthCredential](./auth.emailauthcredential.md) > [fromJSON](./auth.emailauthcredential.fromjson.md)
## EmailAuthCredential.fromJSON() method
Static method to deserialize a JSON representation of an object into an [AuthCredential](./auth.authcredential.md)<!-- -->.
<b>Signature:</b>
```typescript
static fromJSON(json: object | string): EmailAuthCredential | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| json | object \| string | Either <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](./auth.emailauthcredential.md) \| null
If the JSON input does not represent an [AuthCredential](./auth.authcredential.md)<!-- -->, null is returned.