@salesforce/b2c-tooling-sdk / auth / PkceOAuthConfig
Interface: PkceOAuthConfig
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:94
Configuration for the OAuth Authorization Code + PKCE flow.
Extends
Properties
accountManagerHost?
optionalaccountManagerHost:string
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:97
clientId
clientId:
string
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:95
forceRefresh?
optionalforceRefresh:boolean
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:116
Renew a stored sign-in with its refresh token even when the access token is still valid, so it gets a new expiry (used by b2c auth login). Falls back to the browser flow when there is no refresh token or renewal fails.
localPort?
optionallocalPort:number
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:99
Local port for the redirect server (default 8080 or SFCC_OAUTH_LOCAL_PORT).
openBrowser()?
optionalopenBrowser: (url,login?) =>Promise<void>
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:103
Custom browser opener. Receives the authorization URL and a handle to cancel the pending login.
Parameters
url
string
login?
Returns
Promise<void>
persistSession?
optionalpersistSession:boolean
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:110
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?
optionalredirectUri:string
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:101
Override redirect URI (default http://localhost:${localPort} or SFCC_REDIRECT_URI).
scopes?
optionalscopes:string[]
Defined in: packages/b2c-tooling-sdk/src/auth/oauth-pkce.ts:96