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

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

# Class: InMemoryAuthSessionBackend

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

In-memory backend, useful for tests and for IDE adapters that hydrate from
async native storage at startup and write through asynchronously.

## Implements

- [`AuthSessionBackend`](../interfaces/AuthSessionBackend.md)

## Constructors

### Constructor

> **new InMemoryAuthSessionBackend**(): `InMemoryAuthSessionBackend`

#### Returns

`InMemoryAuthSessionBackend`

## Methods

### clearAll()

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

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

#### Returns

`void`

#### Implementation of

[`AuthSessionBackend`](../interfaces/AuthSessionBackend.md).[`clearAll`](../interfaces/AuthSessionBackend.md#clearall)

***

### delete()

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

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

#### Parameters

##### clientId

`string`

#### Returns

`void`

#### Implementation of

[`AuthSessionBackend`](../interfaces/AuthSessionBackend.md).[`delete`](../interfaces/AuthSessionBackend.md#delete)

***

### find()

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

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

#### Parameters

##### clientId

`string`

#### Returns

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

#### Implementation of

[`AuthSessionBackend`](../interfaces/AuthSessionBackend.md).[`find`](../interfaces/AuthSessionBackend.md#find)

***

### list()

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

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

#### Returns

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

#### Implementation of

[`AuthSessionBackend`](../interfaces/AuthSessionBackend.md).[`list`](../interfaces/AuthSessionBackend.md#list)

***

### save()

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

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

#### Parameters

##### session

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

#### Returns

`void`

#### Implementation of

[`AuthSessionBackend`](../interfaces/AuthSessionBackend.md).[`save`](../interfaces/AuthSessionBackend.md#save)
