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

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

# Interface: AuthSessionBackend

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:82](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L82)

Pluggable backend for the unified auth-session store. Synchronous on the
read path so command initialization can decide auth flow without awaiting.
Backends with async-only native storage (VS Code SecretStorage, OS keychain)
maintain an in-memory snapshot hydrated at startup and persist writes
asynchronously; implementations may expose a backend-specific flush hook for
orderly shutdown.

## Methods

### clearAll()

> **clearAll**(): `void`

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:87](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L87)

#### Returns

`void`

***

### delete()

> **delete**(`clientId`): `void`

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:85](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L85)

#### Parameters

##### clientId

`string`

#### Returns

`void`

***

### find()

> **find**(`clientId`): [`AuthSession`](AuthSession.md) \| `null`

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:83](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L83)

#### Parameters

##### clientId

`string`

#### Returns

[`AuthSession`](AuthSession.md) \| `null`

***

### list()

> **list**(): [`AuthSession`](AuthSession.md)[]

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:86](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L86)

#### Returns

[`AuthSession`](AuthSession.md)[]

***

### save()

> **save**(`session`): `void`

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:84](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b0472c439ca6570be5c7809783a46327d7493694/packages/b2c-tooling-sdk/src/auth/session-store.ts#L84)

#### Parameters

##### session

[`AuthSession`](AuthSession.md)

#### Returns

`void`
