Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / auth / PkceOAuthConfig

Interface: PkceOAuthConfig

Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:90

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


clientId

clientId: string

Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:91


localPort?

optional localPort: number

Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:95

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

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

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

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

Released under the Apache-2.0 License.