> ## Documentation Index
> Fetch the complete documentation index at: https://fastmcp-ts.docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuthProviderOptions

Defined in: [server/auth/oauth/provider.ts:7](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/server/auth/oauth/provider.ts#L7)

## Properties

### onAuthorize?

```ts theme={null}
optional onAuthorize?: (client, params, res) => Promise<void>;
```

Defined in: [server/auth/oauth/provider.ts:15](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/server/auth/oauth/provider.ts#L15)

Called during the authorization step. Implementations must eventually redirect
to `params.redirectUri` with a `code` query parameter (and `state` if present).

If omitted, all authorization requests are auto-approved immediately — suitable
for testing and development only.

#### Parameters

##### client

##### params

`AuthorizationParams`

##### res

`Response`

#### Returns

`Promise`\<`void`>

***

### scopes?

```ts theme={null}
optional scopes?: string[];
```

Defined in: [server/auth/oauth/provider.ts:21](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/server/auth/oauth/provider.ts#L21)

Scopes supported by this server, advertised in OAuth metadata.

***

### tokenTtl?

```ts theme={null}
optional tokenTtl?: number;
```

Defined in: [server/auth/oauth/provider.ts:23](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/server/auth/oauth/provider.ts#L23)

Access token lifetime in seconds. Default: 3600.
