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

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

# Function: decodeJwtTokenInfo()

> **decodeJwtTokenInfo**(`token`): `object`

Defined in: [packages/b2c-tooling-sdk/src/auth/jwt-utils.ts:33](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/auth/jwt-utils.ts#L33)

Decode a JWT and return its `expires` Date and `scopes` array. Errors from
`decodeJWT` propagate to the caller — callers that want a soft-fail should
wrap this in try/catch.

## Parameters

### token

`string`

## Returns

`object`

### expires

> **expires**: `Date`

### scopes

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