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

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

# Function: isAuthSessionTokenValid()

> **isAuthSessionTokenValid**(`session`, `requiredScopes`, `expiryBufferSec`, `requiredClientId?`): `boolean`

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

Returns `true` if the session's access token is present, decodes as a JWT,
has not expired (with a small buffer), and (optionally) satisfies the given
scope and clientId requirements. No network calls.

## Parameters

### session

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

### requiredScopes

`string`[] = `[]`

### expiryBufferSec

`number` = `DEFAULT_EXPIRY_BUFFER_SEC`

### requiredClientId?

`string`

## Returns

`boolean`
