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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [config](../index.md) / CreateB2CInstanceOptions

# Interface: CreateB2CInstanceOptions

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:536](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L536)

Options for constructing a B2C instance from resolved configuration.

## Extends

- `Pick`\<[`CreateOAuthOptions`](CreateOAuthOptions.md), `"redirectUri"` \| `"openBrowser"`\>

## Properties

### defaultWebDavClient?

> `optional` **defaultWebDavClient**: `boolean`

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:551](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L551)

Let WebDAV fall back to a browser login with the built-in public client
when neither Basic auth nor an API client is configured. The resulting user
token is authorized by the user's Business Manager permissions, so no
access key or WebDAV Client Permissions entry is needed. OCAPI and SCAPI
are unaffected. Enable it only for WebDAV-only operations (file transfer,
logs, code upload), since the login starts on the first WebDAV request.

***

### oauthStrategy?

> `optional` **oauthStrategy**: [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md) \| () => [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:542](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L542)

Pre-resolved OAuth strategy, or a lazy factory for one. CLI command bases
use the factory form to preserve stored PKCE sessions and avoid prompting
unless an OAuth-backed client is actually used.

***

### openBrowser()?

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

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:532](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L532)

Custom browser opener for browser OAuth flows. Receives the authorization URL and, for PKCE logins, a handle to the pending login.

#### Parameters

##### url

`string`

##### login?

[`BrowserLogin`](../../auth/interfaces/BrowserLogin.md)

#### Returns

`Promise`\<`void`\>

#### Inherited from

[`CreateOAuthOptions`](CreateOAuthOptions.md).[`openBrowser`](CreateOAuthOptions.md#openbrowser)

***

### redirectUri?

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

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:530](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L530)

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

#### Inherited from

[`CreateOAuthOptions`](CreateOAuthOptions.md).[`redirectUri`](CreateOAuthOptions.md#redirecturi)

***

### webdavFallbackStrategy?

> `optional` **webdavFallbackStrategy**: [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md) \| () => [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:557](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/config/types.ts#L557)

WebDAV-only fallback strategy (or lazy factory). Takes precedence over
[defaultWebDavClient](#defaultwebdavclient); used by callers that build their own browser
login strategy.
