voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
25 lines (14 loc) • 720 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [OAuthProvider](./auth.oauthprovider.md) > [credentialFromJSON](./auth.oauthprovider.credentialfromjson.md)
## OAuthProvider.credentialFromJSON() method
Creates an [OAuthCredential](./auth.oauthcredential.md) from a JSON string or a plain object.
<b>Signature:</b>
```typescript
static credentialFromJSON(json: object | string): OAuthCredential;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| json | object \| string | A plain object or a JSON string |
<b>Returns:</b>
[OAuthCredential](./auth.oauthcredential.md)