Skip to content

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

Interface: AuthCredentials ​

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:123

Configuration for resolving an auth strategy. Combines all possible credential types.

Properties ​

accountManagerHost? ​

optional accountManagerHost: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:131

Account Manager host (defaults to account.demandware.com)


apiKey? ​

optional apiKey: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:137

API key for api-key auth


apiKeyHeaderName? ​

optional apiKeyHeaderName: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:139

Header name for API key (defaults to Authorization with Bearer prefix)


clientId? ​

optional clientId: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:125

OAuth client ID


clientSecret? ​

optional clientSecret: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:127

OAuth client secret (for client-credentials flow)


openBrowser()? ​

optional openBrowser: (url) => Promise<void>

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:143

Custom browser opener for implicit OAuth flow. Receives the authorization URL.

Parameters ​

url ​

string

Returns ​

Promise<void>


password? ​

optional password: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:135

Password/access key for basic auth


redirectUri? ​

optional redirectUri: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:141

Override redirect URI for implicit OAuth flow (e.g., for port forwarding in remote environments)


scopes? ​

optional scopes: string[]

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:129

OAuth scopes to request


username? ​

optional username: string

Defined in: packages/b2c-tooling-sdk/src/auth/types.ts:133

Username for basic auth

Released under the Apache-2.0 License.