---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [auth](../index.md) / PkceOAuthConfig

# Interface: PkceOAuthConfig

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:90](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L90)

Configuration for the OAuth Authorization Code + PKCE flow.

## Properties

### accountManagerHost?

> `optional` **accountManagerHost**: `string`

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:93](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L93)

***

### clientId

> **clientId**: `string`

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:91](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L91)

***

### localPort?

> `optional` **localPort**: `number`

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:95](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L95)

Local port for the redirect server (default 8080 or SFCC_OAUTH_LOCAL_PORT).

***

### openBrowser()?

> `optional` **openBrowser**: (`url`) => `Promise`\<`void`\>

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:99](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L99)

Custom browser opener. Receives the authorization URL.

#### Parameters

##### url

`string`

#### Returns

`Promise`\<`void`\>

***

### persistSession?

> `optional` **persistSession**: `boolean`

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:106](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L106)

Persist tokens (access + refresh) to disk between CLI invocations,
keyed by clientId. When a refresh token is available it is used to
silently obtain a new access token instead of opening the browser.
Defaults to `true`.

***

### redirectUri?

> `optional` **redirectUri**: `string`

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:97](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L97)

Override redirect URI (default `http://localhost:${localPort}` or SFCC_REDIRECT_URI).

***

### scopes?

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

Defined in: [packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:92](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts#L92)
