---
title: supertokens-node/recipe/oauth2provider/types
description: References documentation for the supertokens-node/recipe/oauth2provider/types package
sidebar:
  order: 240
---

## Type Aliases

### APIInterface

```ts check=false reason="Generated API signature"
type APIInterface = object;
```

Defined in: [recipe/oauth2provider/types.ts:419](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L419)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="authget"></a> `authGET` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `cookies?`: `string`[]; `redirectTo`: `string`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:430](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L430) |
| <a id="endsessionget"></a> `endSessionGET` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `redirectTo`: `string`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:482](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L482) |
| <a id="endsessionpost"></a> `endSessionPOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `redirectTo`: `string`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:491](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L491) |
| <a id="introspecttokenpost"></a> `introspectTokenPOST` | \| `undefined` \| (`input`) => `Promise`\< \| [`InstrospectTokenResponse`](#instrospecttokenresponse) \| [`GeneralErrorResponse`](types#generalerrorresponse) \| [`ErrorOAuth2`](#erroroauth2)\> | [recipe/oauth2provider/types.ts:474](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L474) |
| <a id="loginget"></a> `loginGET` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `cookies?`: `string`[]; `frontendRedirectTo`: `string`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:420](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L420) |
| <a id="logininfoget"></a> `loginInfoGET` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `info`: [`LoginInfo`](#logininfo); `status`: `"OK"`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:448](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L448) |
| <a id="logoutpost"></a> `logoutPOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `frontendRedirectTo`: `string`; `status`: `"OK"`; \} \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:500](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L500) |
| <a id="revoketokenpost"></a> `revokeTokenPOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `status`: `"OK"`; \} \| [`ErrorOAuth2`](#erroroauth2)\> | [recipe/oauth2provider/types.ts:465](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L465) |
| <a id="tokenpost"></a> `tokenPOST` | \| `undefined` \| (`input`) => `Promise`\< \| [`TokenInfo`](#tokeninfo) \| [`ErrorOAuth2`](#erroroauth2) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:440](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L440) |
| <a id="userinfoget"></a> `userInfoGET` | \| `undefined` \| (`input`) => `Promise`\< \| [`JSONObject`](types#jsonobject) \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/oauth2provider/types.ts:455](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L455) |

***

### APIOptions

```ts check=false reason="Generated API signature"
type APIOptions = object;
```

Defined in: [recipe/oauth2provider/types.ts:44](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L44)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="config"></a> `config` | [`TypeNormalisedInput`](#typenormalisedinput) | [recipe/oauth2provider/types.ts:46](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L46) |
| <a id="isinserverlessenv"></a> `isInServerlessEnv` | `boolean` | [recipe/oauth2provider/types.ts:48](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L48) |
| <a id="recipeid"></a> `recipeId` | `string` | [recipe/oauth2provider/types.ts:47](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L47) |
| <a id="recipeimplementation"></a> `recipeImplementation` | [`RecipeInterface`](#recipeinterface) | [recipe/oauth2provider/types.ts:45](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L45) |
| <a id="req"></a> `req` | `BaseRequest` | [recipe/oauth2provider/types.ts:49](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L49) |
| <a id="res"></a> `res` | `BaseResponse` | [recipe/oauth2provider/types.ts:50](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L50) |

***

### ConsentRequest

```ts check=false reason="Generated API signature"
type ConsentRequest = object;
```

Defined in: [recipe/oauth2provider/types.ts:68](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L68)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="acr"></a> `acr?` | `string` | [recipe/oauth2provider/types.ts:70](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L70) |
| <a id="amr"></a> `amr?` | `string`[] | [recipe/oauth2provider/types.ts:73](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L73) |
| <a id="challenge"></a> `challenge` | `string` | [recipe/oauth2provider/types.ts:76](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L76) |
| <a id="client"></a> `client?` | `OAuth2Client` | [recipe/oauth2provider/types.ts:79](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L79) |
| <a id="context"></a> `context?` | [`JSONObject`](types#jsonobject) | [recipe/oauth2provider/types.ts:82](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L82) |
| <a id="loginchallenge"></a> `loginChallenge?` | `string` | [recipe/oauth2provider/types.ts:85](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L85) |
| <a id="loginsessionid"></a> `loginSessionId?` | `string` | [recipe/oauth2provider/types.ts:88](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L88) |
| <a id="oidccontext"></a> `oidcContext?` | `any` | [recipe/oauth2provider/types.ts:91](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L91) |
| <a id="requestedaccesstokenaudience"></a> `requestedAccessTokenAudience?` | `string`[] | [recipe/oauth2provider/types.ts:94](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L94) |
| <a id="requestedscope"></a> `requestedScope?` | `string`[] | [recipe/oauth2provider/types.ts:97](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L97) |
| <a id="skip"></a> `skip?` | `boolean` | [recipe/oauth2provider/types.ts:100](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L100) |
| <a id="subject"></a> `subject?` | `string` | [recipe/oauth2provider/types.ts:103](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L103) |

***

### CreateOAuth2ClientInput

```ts check=false reason="Generated API signature"
type CreateOAuth2ClientInput = Partial<Omit<OAuth2ClientOptions, "createdAt" | "updatedAt">>;
```

Defined in: [recipe/oauth2provider/types.ts:563](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L563)

***

### DeleteOAuth2ClientInput

```ts check=false reason="Generated API signature"
type DeleteOAuth2ClientInput = object;
```

Defined in: [recipe/oauth2provider/types.ts:575](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L575)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="clientid"></a> `clientId` | `string` | [recipe/oauth2provider/types.ts:576](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L576) |

***

### ErrorOAuth2

```ts check=false reason="Generated API signature"
type ErrorOAuth2 = object;
```

Defined in: [recipe/oauth2provider/types.ts:53](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L53)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="error"></a> `error` | `string` | [recipe/oauth2provider/types.ts:58](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L58) |
| <a id="errordescription"></a> `errorDescription` | `string` | [recipe/oauth2provider/types.ts:61](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L61) |
| <a id="status"></a> `status` | `"ERROR"` | [recipe/oauth2provider/types.ts:54](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L54) |
| <a id="statuscode"></a> `statusCode?` | `number` | [recipe/oauth2provider/types.ts:65](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L65) |

***

### GetOAuth2ClientsInput

```ts check=false reason="Generated API signature"
type GetOAuth2ClientsInput = object;
```

Defined in: [recipe/oauth2provider/types.ts:546](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L546)

#### Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="clientname"></a> `clientName?` | `string` | The name of the clients to filter by. | [recipe/oauth2provider/types.ts:560](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L560) |
| <a id="pagesize"></a> `pageSize?` | `number` | Items per Page. Defaults to 250. | [recipe/oauth2provider/types.ts:550](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L550) |
| <a id="paginationtoken"></a> `paginationToken?` | `string` | Next Page Token. Defaults to "1". | [recipe/oauth2provider/types.ts:555](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L555) |

***

### InstrospectTokenResponse

```ts check=false reason="Generated API signature"
type InstrospectTokenResponse = 
  | {
  active: false;
}
  | object & JSONObject;
```

Defined in: [recipe/oauth2provider/types.ts:176](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L176)

***

### LoginInfo

```ts check=false reason="Generated API signature"
type LoginInfo = object;
```

Defined in: [recipe/oauth2provider/types.ts:151](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L151)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="clientid-1"></a> `clientId` | `string` | [recipe/oauth2provider/types.ts:152](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L152) |
| <a id="clientname-1"></a> `clientName` | `string` | [recipe/oauth2provider/types.ts:154](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L154) |
| <a id="clienturi"></a> `clientUri?` | `string` | [recipe/oauth2provider/types.ts:162](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L162) |
| <a id="logouri"></a> `logoUri?` | `string` | [recipe/oauth2provider/types.ts:160](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L160) |
| <a id="metadata"></a> `metadata?` | `Record`\<`string`, `any`\> \| `null` | [recipe/oauth2provider/types.ts:164](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L164) |
| <a id="policyuri"></a> `policyUri?` | `string` | [recipe/oauth2provider/types.ts:158](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L158) |
| <a id="tosuri"></a> `tosUri?` | `string` | [recipe/oauth2provider/types.ts:156](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L156) |

***

### LoginRequest

```ts check=false reason="Generated API signature"
type LoginRequest = object;
```

Defined in: [recipe/oauth2provider/types.ts:106](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L106)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="challenge-1"></a> `challenge` | `string` | [recipe/oauth2provider/types.ts:108](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L108) |
| <a id="client-1"></a> `client` | `OAuth2Client` | [recipe/oauth2provider/types.ts:111](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L111) |
| <a id="oidccontext-1"></a> `oidcContext?` | `any` | [recipe/oauth2provider/types.ts:114](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L114) |
| <a id="requestedaccesstokenaudience-1"></a> `requestedAccessTokenAudience?` | `string`[] | [recipe/oauth2provider/types.ts:120](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L120) |
| <a id="requestedscope-1"></a> `requestedScope?` | `string`[] | [recipe/oauth2provider/types.ts:123](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L123) |
| <a id="requesturl"></a> `requestUrl` | `string` | [recipe/oauth2provider/types.ts:117](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L117) |
| <a id="sessionid"></a> `sessionId?` | `string` | [recipe/oauth2provider/types.ts:126](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L126) |
| <a id="skip-1"></a> `skip` | `boolean` | [recipe/oauth2provider/types.ts:130](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L130) |
| <a id="subject-1"></a> `subject` | `string` | [recipe/oauth2provider/types.ts:133](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L133) |

***

### OAuth2ClientOptions

```ts check=false reason="Generated API signature"
type OAuth2ClientOptions = object;
```

Defined in: [recipe/oauth2provider/types.ts:510](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L510)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="audience"></a> `audience?` | `string`[] | [recipe/oauth2provider/types.ts:534](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L534) |
| <a id="authorizationcodegrantaccesstokenlifespan"></a> `authorizationCodeGrantAccessTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:522](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L522) |
| <a id="authorizationcodegrantidtokenlifespan"></a> `authorizationCodeGrantIdTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:523](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L523) |
| <a id="authorizationcodegrantrefreshtokenlifespan"></a> `authorizationCodeGrantRefreshTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:524](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L524) |
| <a id="clientcredentialsgrantaccesstokenlifespan"></a> `clientCredentialsGrantAccessTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:525](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L525) |
| <a id="clientid-2"></a> `clientId` | `string` | [recipe/oauth2provider/types.ts:511](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L511) |
| <a id="clientname-2"></a> `clientName` | `string` | [recipe/oauth2provider/types.ts:516](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L516) |
| <a id="clientsecret"></a> `clientSecret?` | `string` | [recipe/oauth2provider/types.ts:512](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L512) |
| <a id="clienturi-1"></a> `clientUri?` | `string` | [recipe/oauth2provider/types.ts:538](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L538) |
| <a id="createdat"></a> `createdAt` | `string` | [recipe/oauth2provider/types.ts:513](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L513) |
| <a id="enablerefreshtokenrotation"></a> `enableRefreshTokenRotation?` | `boolean` | [recipe/oauth2provider/types.ts:543](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L543) |
| <a id="granttypes"></a> `grantTypes?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:535](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L535) |
| <a id="implicitgrantaccesstokenlifespan"></a> `implicitGrantAccessTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:526](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L526) |
| <a id="implicitgrantidtokenlifespan"></a> `implicitGrantIdTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:527](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L527) |
| <a id="logouri-1"></a> `logoUri?` | `string` | [recipe/oauth2provider/types.ts:539](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L539) |
| <a id="metadata-1"></a> `metadata?` | `Record`\<`string`, `any`\> | [recipe/oauth2provider/types.ts:542](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L542) |
| <a id="policyuri-1"></a> `policyUri?` | `string` | [recipe/oauth2provider/types.ts:540](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L540) |
| <a id="postlogoutredirecturis"></a> `postLogoutRedirectUris?` | `string`[] | [recipe/oauth2provider/types.ts:520](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L520) |
| <a id="redirecturis"></a> `redirectUris?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:519](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L519) |
| <a id="refreshtokengrantaccesstokenlifespan"></a> `refreshTokenGrantAccessTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:528](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L528) |
| <a id="refreshtokengrantidtokenlifespan"></a> `refreshTokenGrantIdTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:529](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L529) |
| <a id="refreshtokengrantrefreshtokenlifespan"></a> `refreshTokenGrantRefreshTokenLifespan?` | `string` \| `null` | [recipe/oauth2provider/types.ts:530](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L530) |
| <a id="responsetypes"></a> `responseTypes?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:536](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L536) |
| <a id="scope"></a> `scope` | `string` | [recipe/oauth2provider/types.ts:518](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L518) |
| <a id="tokenendpointauthmethod"></a> `tokenEndpointAuthMethod` | `string` | [recipe/oauth2provider/types.ts:532](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L532) |
| <a id="tosuri-1"></a> `tosUri?` | `string` | [recipe/oauth2provider/types.ts:541](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L541) |
| <a id="updatedat"></a> `updatedAt` | `string` | [recipe/oauth2provider/types.ts:514](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L514) |

***

### PayloadBuilderFunction()

```ts check=false reason="Generated API signature"
type PayloadBuilderFunction = (user, scopes, sessionHandle, userContext) => Promise<JSONObject>;
```

Defined in: [recipe/oauth2provider/types.ts:579](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L579)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `user` | [`User`](index#user-1) |
| `scopes` | `string`[] |
| `sessionHandle` | `string` |
| `userContext` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<[`JSONObject`](types#jsonobject)\>

***

### RecipeInterface

```ts check=false reason="Generated API signature"
type RecipeInterface = object;
```

Defined in: [recipe/oauth2provider/types.ts:178](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L178)

#### Methods

##### acceptConsentRequest()

```ts check=false reason="Generated API signature"
acceptConsentRequest(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:191](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L191)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `context?`: `any`; `grantAccessTokenAudience?`: `string`[]; `grantScope?`: `string`[]; `handledAt?`: `string`; `initialAccessTokenPayload`: [`JSONObject`](types#jsonobject) \| `undefined`; `initialIdTokenPayload`: [`JSONObject`](types#jsonobject) \| `undefined`; `rsub`: `string`; `sessionHandle`: `string`; `tenantId`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.context?` | `any` |
| `input.grantAccessTokenAudience?` | `string`[] |
| `input.grantScope?` | `string`[] |
| `input.handledAt?` | `string` |
| `input.initialAccessTokenPayload` | [`JSONObject`](types#jsonobject) \| `undefined` |
| `input.initialIdTokenPayload` | [`JSONObject`](types#jsonobject) \| `undefined` |
| `input.rsub` | `string` |
| `input.sessionHandle` | `string` |
| `input.tenantId` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
  `status`: `"OK"`;
\}\>

##### acceptLoginRequest()

```ts check=false reason="Generated API signature"
acceptLoginRequest(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:222](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L222)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `acr?`: `string`; `amr?`: `string`[]; `challenge`: `string`; `context?`: `any`; `extendSessionLifespan?`: `boolean`; `identityProviderSessionId?`: `string`; `subject`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.acr?` | `string` |
| `input.amr?` | `string`[] |
| `input.challenge` | `string` |
| `input.context?` | `any` |
| `input.extendSessionLifespan?` | `boolean` |
| `input.identityProviderSessionId?` | `string` |
| `input.subject` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
  `status`: `"OK"`;
\}\>

##### acceptLogoutRequest()

```ts check=false reason="Generated API signature"
acceptLogoutRequest(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
}>;
```

Defined in: [recipe/oauth2provider/types.ts:412](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L412)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
\}\>

##### authorization()

```ts check=false reason="Generated API signature"
authorization(input): Promise<
  | ErrorOAuth2
  | {
  cookies: string[] | undefined;
  redirectTo: string;
}>;
```

Defined in: [recipe/oauth2provider/types.ts:179](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L179)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `cookies`: `string` \| `undefined`; `params`: `Record`\<`string`, `string`\>; `session`: `SessionContainerInterface` \| `undefined`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.cookies` | `string` \| `undefined` |
| `input.params` | `Record`\<`string`, `string`\> |
| `input.session` | `SessionContainerInterface` \| `undefined` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `cookies`: `string`[] \| `undefined`;
  `redirectTo`: `string`;
\}\>

##### buildAccessTokenPayload()

```ts check=false reason="Generated API signature"
buildAccessTokenPayload(input): Promise<JSONObject>;
```

Defined in: [recipe/oauth2provider/types.ts:342](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L342)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `client`: `OAuth2Client`; `scopes`: `string`[]; `sessionHandle`: `string` \| `undefined`; `user`: [`User`](index#user-1) \| `undefined`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.client` | `OAuth2Client` |
| `input.scopes` | `string`[] |
| `input.sessionHandle` | `string` \| `undefined` |
| `input.user` | [`User`](index#user-1) \| `undefined` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<[`JSONObject`](types#jsonobject)\>

##### buildIdTokenPayload()

```ts check=false reason="Generated API signature"
buildIdTokenPayload(input): Promise<JSONObject>;
```

Defined in: [recipe/oauth2provider/types.ts:349](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L349)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `client`: `OAuth2Client`; `scopes`: `string`[]; `sessionHandle`: `string` \| `undefined`; `user`: [`User`](index#user-1) \| `undefined`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.client` | `OAuth2Client` |
| `input.scopes` | `string`[] |
| `input.sessionHandle` | `string` \| `undefined` |
| `input.user` | [`User`](index#user-1) \| `undefined` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<[`JSONObject`](types#jsonobject)\>

##### buildUserInfo()

```ts check=false reason="Generated API signature"
buildUserInfo(input): Promise<JSONObject>;
```

Defined in: [recipe/oauth2provider/types.ts:356](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L356)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `accessTokenPayload`: [`JSONObject`](types#jsonobject); `scopes`: `string`[]; `tenantId`: `string`; `user`: [`User`](index#user-1); `userContext`: [`UserContext`](types#usercontext); \} |
| `input.accessTokenPayload` | [`JSONObject`](types#jsonobject) |
| `input.scopes` | `string`[] |
| `input.tenantId` | `string` |
| `input.user` | [`User`](index#user-1) |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<[`JSONObject`](types#jsonobject)\>

##### createOAuth2Client()

```ts check=false reason="Generated API signature"
createOAuth2Client(input): Promise<
  | {
  client: OAuth2Client;
  status: "OK";
}
  | {
  error: string;
  errorDescription: string;
  status: "ERROR";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:279](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L279)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | `Partial`\<`Omit`\<[`OAuth2ClientOptions`](#oauth2clientoptions), `"createdAt"` \| `"updatedAt"`\>\> & `object` |

###### Returns

`Promise`\<
  \| \{
  `client`: `OAuth2Client`;
  `status`: `"OK"`;
\}
  \| \{
  `error`: `string`;
  `errorDescription`: `string`;
  `status`: `"ERROR"`;
\}\>

##### deleteOAuth2Client()

```ts check=false reason="Generated API signature"
deleteOAuth2Client(input): Promise<
  | {
  status: "OK";
}
  | {
  error: string;
  errorDescription: string;
  status: "ERROR";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:309](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L309)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | [`DeleteOAuth2ClientInput`](#deleteoauth2clientinput) & `object` |

###### Returns

`Promise`\<
  \| \{
  `status`: `"OK"`;
\}
  \| \{
  `error`: `string`;
  `errorDescription`: `string`;
  `status`: `"ERROR"`;
\}\>

##### endSession()

```ts check=false reason="Generated API signature"
endSession(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
}>;
```

Defined in: [recipe/oauth2provider/types.ts:406](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L406)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `params`: `Record`\<`string`, `string`\>; `session?`: `SessionContainerInterface`; `shouldTryRefresh`: `boolean`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.params` | `Record`\<`string`, `string`\> |
| `input.session?` | `SessionContainerInterface` |
| `input.shouldTryRefresh` | `boolean` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
\}\>

##### getConsentRequest()

```ts check=false reason="Generated API signature"
getConsentRequest(input): Promise<ErrorOAuth2 | ConsentRequest>;
```

Defined in: [recipe/oauth2provider/types.ts:190](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L190)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<[`ErrorOAuth2`](#erroroauth2) \| [`ConsentRequest`](#consentrequest)\>

##### getFrontendRedirectionURL()

```ts check=false reason="Generated API signature"
getFrontendRedirectionURL(input): Promise<string>;
```

Defined in: [recipe/oauth2provider/types.ts:363](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L363)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \| \{ `forceFreshAuth`: `boolean`; `hint`: `string` \| `undefined`; `loginChallenge`: `string`; `tenantId`: `string`; `type`: `"login"`; `userContext`: [`UserContext`](types#usercontext); \} \| \{ `loginChallenge`: `string`; `type`: `"try-refresh"`; `userContext`: [`UserContext`](types#usercontext); \} \| \{ `logoutChallenge`: `string`; `type`: `"logout-confirmation"`; `userContext`: [`UserContext`](types#usercontext); \} \| \{ `type`: `"post-logout-fallback"`; `userContext`: [`UserContext`](types#usercontext); \} |

###### Returns

`Promise`\<`string`\>

##### getLoginRequest()

```ts check=false reason="Generated API signature"
getLoginRequest(input): Promise<
  | ErrorOAuth2
| LoginRequest & object>;
```

Defined in: [recipe/oauth2provider/types.ts:218](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L218)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| [`LoginRequest`](#loginrequest) & `object`\>

##### getOAuth2Client()

```ts check=false reason="Generated API signature"
getOAuth2Client(input): Promise<
  | {
  client: OAuth2Client;
  status: "OK";
}
  | {
  error: string;
  errorDescription: string;
  status: "ERROR";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:252](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L252)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `clientId`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.clientId` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| \{
  `client`: `OAuth2Client`;
  `status`: `"OK"`;
\}
  \| \{
  `error`: `string`;
  `errorDescription`: `string`;
  `status`: `"ERROR"`;
\}\>

##### getOAuth2Clients()

```ts check=false reason="Generated API signature"
getOAuth2Clients(input): Promise<
  | {
  clients: OAuth2Client[];
  nextPaginationToken?: string;
  status: "OK";
}
  | {
  error: string;
  errorDescription: string;
  status: "ERROR";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:263](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L263)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | [`GetOAuth2ClientsInput`](#getoauth2clientsinput) & `object` |

###### Returns

`Promise`\<
  \| \{
  `clients`: `OAuth2Client`[];
  `nextPaginationToken?`: `string`;
  `status`: `"OK"`;
\}
  \| \{
  `error`: `string`;
  `errorDescription`: `string`;
  `status`: `"ERROR"`;
\}\>

##### getRequestedScopes()

```ts check=false reason="Generated API signature"
getRequestedScopes(input): Promise<string[]>;
```

Defined in: [recipe/oauth2provider/types.ts:335](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L335)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `clientId`: `string`; `recipeUserId`: [`RecipeUserId`](index#recipeuserid-1) \| `undefined`; `scopeParam`: `string`[]; `sessionHandle`: `string` \| `undefined`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.clientId` | `string` |
| `input.recipeUserId` | [`RecipeUserId`](index#recipeuserid-1) \| `undefined` |
| `input.scopeParam` | `string`[] |
| `input.sessionHandle` | `string` \| `undefined` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<`string`[]\>

##### introspectToken()

```ts check=false reason="Generated API signature"
introspectToken(input): Promise<
  | InstrospectTokenResponse & { status: "OK"; }
| ErrorOAuth2>;
```

Defined in: [recipe/oauth2provider/types.ts:401](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L401)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `scopes?`: `string`[]; `token`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.scopes?` | `string`[] |
| `input.token` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| InstrospectTokenResponse & \{ status: "OK"; \}
  \| [`ErrorOAuth2`](#erroroauth2)\>

##### rejectConsentRequest()

```ts check=false reason="Generated API signature"
rejectConsentRequest(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:212](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L212)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `error`: [`ErrorOAuth2`](#erroroauth2); `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.error` | [`ErrorOAuth2`](#erroroauth2) |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
  `status`: `"OK"`;
\}\>

##### rejectLoginRequest()

```ts check=false reason="Generated API signature"
rejectLoginRequest(input): Promise<
  | ErrorOAuth2
  | {
  redirectTo: string;
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:246](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L246)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `error`: [`ErrorOAuth2`](#erroroauth2); `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.error` | [`ErrorOAuth2`](#erroroauth2) |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `redirectTo`: `string`;
  `status`: `"OK"`;
\}\>

##### rejectLogoutRequest()

```ts check=false reason="Generated API signature"
rejectLogoutRequest(input): Promise<{
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:416](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L416)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `challenge`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.challenge` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<\{
  `status`: `"OK"`;
\}\>

##### revokeToken()

```ts check=false reason="Generated API signature"
revokeToken(input): Promise<
  | ErrorOAuth2
  | {
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:388](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L388)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | `object` & \| \{ `authorizationHeader`: `string`; \} \| \{ `clientId`: `string`; `clientSecret?`: `string`; \} |

###### Returns

`Promise`\<
  \| [`ErrorOAuth2`](#erroroauth2)
  \| \{
  `status`: `"OK"`;
\}\>

##### revokeTokensByClientId()

```ts check=false reason="Generated API signature"
revokeTokensByClientId(input): Promise<{
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:399](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L399)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `clientId`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.clientId` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<\{
  `status`: `"OK"`;
\}\>

##### revokeTokensBySessionHandle()

```ts check=false reason="Generated API signature"
revokeTokensBySessionHandle(input): Promise<{
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:400](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L400)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `sessionHandle`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.sessionHandle` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<\{
  `status`: `"OK"`;
\}\>

##### tokenExchange()

```ts check=false reason="Generated API signature"
tokenExchange(input): Promise<ErrorOAuth2 | TokenInfo>;
```

Defined in: [recipe/oauth2provider/types.ts:185](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L185)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `authorizationHeader?`: `string`; `body`: `Record`\<`string`, `string` \| `undefined`\>; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.authorizationHeader?` | `string` |
| `input.body` | `Record`\<`string`, `string` \| `undefined`\> |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<[`ErrorOAuth2`](#erroroauth2) \| [`TokenInfo`](#tokeninfo)\>

##### updateOAuth2Client()

```ts check=false reason="Generated API signature"
updateOAuth2Client(input): Promise<
  | {
  client: OAuth2Client;
  status: "OK";
}
  | {
  error: string;
  errorDescription: string;
  status: "ERROR";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:294](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L294)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | [`NonNullableProperties`](types#nonnullableproperties)\<`Omit`\<`Partial`\<`Omit`\<[`OAuth2ClientOptions`](#oauth2clientoptions), `"createdAt"` \| `"updatedAt"`\>\>, `"redirectUris"` \| `"grantTypes"` \| `"responseTypes"` \| `"metadata"`\>\> & `object` & `object` |

###### Returns

`Promise`\<
  \| \{
  `client`: `OAuth2Client`;
  `status`: `"OK"`;
\}
  \| \{
  `error`: `string`;
  `errorDescription`: `string`;
  `status`: `"ERROR"`;
\}\>

##### validateOAuth2AccessToken()

```ts check=false reason="Generated API signature"
validateOAuth2AccessToken(input): Promise<{
  payload: JSONObject;
  status: "OK";
}>;
```

Defined in: [recipe/oauth2provider/types.ts:324](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L324)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `checkDatabase?`: `boolean`; `requirements?`: \{ `audience?`: `string`; `clientId?`: `string`; `scopes?`: `string`[]; \}; `token`: `string`; `userContext`: [`UserContext`](types#usercontext); \} |
| `input.checkDatabase?` | `boolean` |
| `input.requirements?` | \{ `audience?`: `string`; `clientId?`: `string`; `scopes?`: `string`[]; \} |
| `input.requirements.audience?` | `string` |
| `input.requirements.clientId?` | `string` |
| `input.requirements.scopes?` | `string`[] |
| `input.token` | `string` |
| `input.userContext` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<\{
  `payload`: [`JSONObject`](types#jsonobject);
  `status`: `"OK"`;
\}\>

***

### TokenInfo

```ts check=false reason="Generated API signature"
type TokenInfo = object;
```

Defined in: [recipe/oauth2provider/types.ts:136](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L136)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="access_token"></a> `access_token?` | `string` | [recipe/oauth2provider/types.ts:138](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L138) |
| <a id="expires_in"></a> `expires_in` | `number` | [recipe/oauth2provider/types.ts:140](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L140) |
| <a id="id_token"></a> `id_token?` | `string` | [recipe/oauth2provider/types.ts:142](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L142) |
| <a id="refresh_token"></a> `refresh_token?` | `string` | [recipe/oauth2provider/types.ts:144](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L144) |
| <a id="scope-1"></a> `scope` | `string` | [recipe/oauth2provider/types.ts:146](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L146) |
| <a id="token_type"></a> `token_type` | `string` | [recipe/oauth2provider/types.ts:148](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L148) |

***

### TypeInput

```ts check=false reason="Generated API signature"
type TypeInput = object;
```

Defined in: [recipe/oauth2provider/types.ts:24](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L24)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="override"></a> `override?` | `object` | [recipe/oauth2provider/types.ts:25](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L25) |
| `override.apis?` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/oauth2provider/types.ts:30](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L30) |
| `override.functions?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/oauth2provider/types.ts:26](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L26) |

***

### TypeNormalisedInput

```ts check=false reason="Generated API signature"
type TypeNormalisedInput = object;
```

Defined in: [recipe/oauth2provider/types.ts:34](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L34)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="override-1"></a> `override` | `object` | [recipe/oauth2provider/types.ts:35](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L35) |
| `override.apis` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/oauth2provider/types.ts:40](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L40) |
| `override.functions` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/oauth2provider/types.ts:36](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L36) |

***

### UpdateOAuth2ClientInput

```ts check=false reason="Generated API signature"
type UpdateOAuth2ClientInput = NonNullableProperties<Omit<CreateOAuth2ClientInput, "redirectUris" | "grantTypes" | "responseTypes" | "metadata">> & object;
```

Defined in: [recipe/oauth2provider/types.ts:565](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L565)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `clientId` | `string` | [recipe/oauth2provider/types.ts:568](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L568) |
| `grantTypes?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:570](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L570) |
| `metadata?` | `Record`\<`string`, `any`\> \| `null` | [recipe/oauth2provider/types.ts:572](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L572) |
| `redirectUris?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:569](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L569) |
| `responseTypes?` | `string`[] \| `null` | [recipe/oauth2provider/types.ts:571](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L571) |

***

### UserInfo

```ts check=false reason="Generated API signature"
type UserInfo = object;
```

Defined in: [recipe/oauth2provider/types.ts:167](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L167)

#### Indexable

```ts check=false reason="Generated API signature"
[key: string]: JSONValue
```

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="email"></a> `email?` | `string` | [recipe/oauth2provider/types.ts:169](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L169) |
| <a id="email_verified"></a> `email_verified?` | `boolean` | [recipe/oauth2provider/types.ts:170](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L170) |
| <a id="phonenumber"></a> `phoneNumber?` | `string` | [recipe/oauth2provider/types.ts:171](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L171) |
| <a id="phonenumber_verified"></a> `phoneNumber_verified?` | `boolean` | [recipe/oauth2provider/types.ts:172](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L172) |
| <a id="sub"></a> `sub` | `string` | [recipe/oauth2provider/types.ts:168](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L168) |

***

### UserInfoBuilderFunction()

```ts check=false reason="Generated API signature"
type UserInfoBuilderFunction = (user, accessTokenPayload, scopes, tenantId, userContext) => Promise<JSONObject>;
```

Defined in: [recipe/oauth2provider/types.ts:585](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/oauth2provider/types.ts#L585)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `user` | [`User`](index#user-1) |
| `accessTokenPayload` | [`JSONObject`](types#jsonobject) |
| `scopes` | `string`[] |
| `tenantId` | `string` |
| `userContext` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<[`JSONObject`](types#jsonobject)\>
