voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
25 lines (14 loc) • 677 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [PhoneAuthCredential](./auth.phoneauthcredential.md) > [fromJSON](./auth.phoneauthcredential.fromjson.md)
## PhoneAuthCredential.fromJSON() method
Generates a phone credential based on a plain object or a JSON string.
<b>Signature:</b>
```typescript
static fromJSON(json: object | string): PhoneAuthCredential | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| json | object \| string | |
<b>Returns:</b>
[PhoneAuthCredential](./auth.phoneauthcredential.md) \| null