# OAuthInternetAccount

Auto-generated from the config schema in the source. See the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `authentication` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/authentication/src/OAuthModel/configSchema.ts).

Signs requests to a resource that uses OAuth 2.0, fetching and refreshing
the access token through the provider's authorization flow.

## Related links

- **Extended by:** [DropboxOAuthInternetAccount](../dropboxoauthinternetaccount)
- **Extended by:** [GoogleDriveOAuthInternetAccount](../googledriveoauthinternetaccount)
- **State model:** [runtime API](../../models/oauthinternetaccount)
- **Base config:** [BaseInternetAccount](../baseinternetaccount)

## Config slots

`OAuthInternetAccount` is a shared base schema, not a type you name in a config. Set these slots on one of the configs under **Extended by** above, each of which lists them as inherited and shows the shape in an example. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **tokenType**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>'Bearer'</code> | a custom name for a token to include in the header |
| **authEndpoint**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | the authorization code endpoint of the internet account |
| **tokenEndpoint**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | the token endpoint of the internet account |
| **needsPKCE**<br>[`boolean`](https://jbrowse.org/jb2/docs/config_guides/slot_types#boolean) = <code>false</code> | boolean to indicate if the endpoint needs a PKCE code |
| **clientId**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | id for the OAuth application |
| **scopes**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | optional scopes for the authorization call |
| **responseType**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>'code'</code> | the type of response from the authorization endpoint. can be 'token' or 'code' |
| <span class="slot-group">Inherited from [BaseInternetAccount](../baseinternetaccount) | <span class="slot-group-count">4 slots |
| **name**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | descriptive name of the internet account |
| **description**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | a description of the internet account |
| **authHeader**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>'Authorization'</code> | request header for credentials |
| **domains**<br>[`stringArray`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringarray) = <code>[]</code> | array of valid domains the url can contain to use this account |

