[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [auth](../README) / OAuth2Config

# Interface: OAuth2Config

Defined in: [packages/auth/src/social/types.ts:46](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L46)

Per-provider OAuth2 credentials passed to a driver's constructor (and stored in
`config/social.ts`). `redirectUrl` must exactly match the callback URL
registered with the provider — the driver always uses it verbatim and never
derives it from the incoming request.

## Extended by

- [`AppleOAuth2Config`](AppleOAuth2Config)

## Properties

### clientId

> **clientId**: `string`

Defined in: [packages/auth/src/social/types.ts:48](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L48)

OAuth2 client / application ID issued by the provider.

***

### clientSecret?

> `optional` **clientSecret?**: `string`

Defined in: [packages/auth/src/social/types.ts:50](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L50)

Static client secret, or omit for Apple and supply teamId/keyId/privateKey instead.

***

### redirectUrl

> **redirectUrl**: `string`

Defined in: [packages/auth/src/social/types.ts:52](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L52)

Fixed callback URL, matching the one registered with the provider.

***

### scopes?

> `optional` **scopes?**: `string`[]

Defined in: [packages/auth/src/social/types.ts:54](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L54)

Scopes to request; when omitted the driver's `defaultScopes()` are used.
