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

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

# Interface: AuthSession

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

## Properties

### accessToken

> **accessToken**: `string`

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

***

### accountManagerHost?

> `optional` **accountManagerHost**: `string` \| `null`

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

Account Manager host the session was minted against.

***

### clientId

> **clientId**: `string`

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

***

### expiresAt?

> `optional` **expiresAt**: `string` \| `null`

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

ISO timestamp of access-token expiry (informational; JWT exp is authoritative).

***

### flow

> **flow**: [`AuthSessionFlow`](../type-aliases/AuthSessionFlow.md)

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

Which flow produced this session (informational; controls refresh policy).

***

### lastUsedAt?

> `optional` **lastUsedAt**: `string` \| `null`

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

ISO timestamp of the most recent write.

***

### pkceUnsupported?

> `optional` **pkceUnsupported**: `boolean`

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

Whether this implicit session was created after Account Manager rejected
Authorization Code + PKCE for the client. The user-auth fallback uses this
marker, together with `accountManagerHost`, to avoid repeating a PKCE flow
that cannot succeed on later process or extension activations.

***

### refreshToken?

> `optional` **refreshToken**: `string` \| `null`

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

Only set for PKCE. Implicit and client-credentials never have a refresh token.

***

### scopes?

> `optional` **scopes**: `string`[]

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

Scopes recorded with the access token.

***

### sub?

> `optional` **sub**: `string` \| `null`

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

JWT `sub` claim, when available. Recorded for diagnostics.
