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

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

# Function: setStoredSession()

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

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

Writes a session to the JSON file, creating the directory if needed.

## Parameters

### session

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

## Returns

`void`
