voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
35 lines (22 loc) • 1.78 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [OAuthCredential](./auth.oauthcredential.md)
## OAuthCredential class
Represents the OAuth credentials returned by an [OAuthProvider](./auth.oauthprovider.md)<!-- -->.
<b>Signature:</b>
```typescript
export declare class OAuthCredential extends AuthCredential
```
<b>Extends:</b> [AuthCredential](./auth.authcredential.md)
## Remarks
Implementations specify the details about each auth provider's credential requirements.
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [accessToken?](./auth.oauthcredential.accesstoken.md) | | string | <i>(Optional)</i> The OAuth access token associated with the credential if it belongs to an [OAuthProvider](./auth.oauthprovider.md)<!-- -->, such as <code>facebook.com</code>, <code>twitter.com</code>, etc. |
| [idToken?](./auth.oauthcredential.idtoken.md) | | string | <i>(Optional)</i> The OAuth ID token associated with the credential if it belongs to an OIDC provider, such as <code>google.com</code>. |
| [secret?](./auth.oauthcredential.secret.md) | | string | <i>(Optional)</i> The OAuth access token secret associated with the credential if it belongs to an OAuth 1.0 provider, such as <code>twitter.com</code>. |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [fromJSON(json)](./auth.oauthcredential.fromjson.md) | <code>static</code> | Static method to deserialize a JSON representation of an object into an [AuthCredential](./auth.authcredential.md)<!-- -->. |
| [toJSON()](./auth.oauthcredential.tojson.md) | | Returns a JSON-serializable representation of this object. |