---
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:75](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L75)

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:80](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L80)

#### Returns

`void`

***

### delete()

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

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:78](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L78)

#### Parameters

##### clientId

`string`

#### Returns

`void`

***

### find()

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

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:76](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L76)

#### Parameters

##### clientId

`string`

#### Returns

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

***

### list()

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

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:79](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L79)

#### Returns

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

***

### save()

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

Defined in: [packages/b2c-tooling-sdk/src/auth/session-store.ts:77](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/auth/session-store.ts#L77)

#### Parameters

##### session

[`AuthSession`](AuthSession.md)

#### Returns

`void`
