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

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

# Function: initializeStatefulStore()

> **initializeStatefulStore**(`dataDir`): `void`

Defined in: [packages/b2c-tooling-sdk/src/auth/stateful-store.ts:59](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/auth/stateful-store.ts#L59)

Initialize the stateful store with the oclif data directory.
Call this from BaseCommand.init() with this.config.dataDir so the session
file is stored alongside other CLI data (e.g. ~/Library/Application Support/@salesforce/b2c-cli).

## Parameters

### dataDir

`string`

## Returns

`void`
