---
displayed_sidebar: servicesSidebar
---

import TypeList from "@site/src/components/TypeList"

# TokenService

## constructor

### Parameters

<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}  sectionTitle="new TokenService"/>

___

## Properties

<TypeList types={[{"name":"RESOLUTION_KEY","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"configModule_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}  sectionTitle="TokenService"/>

___

## Methods

### verifyToken

#### Parameters

<TypeList types={[{"name":"token","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`VerifyOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}  sectionTitle="verifyToken"/>

#### Returns

<TypeList types={[{"name":"string \\| Jwt \\| JwtPayload","type":"`string` \\| `Jwt` \\| `JwtPayload`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}  sectionTitle="verifyToken"/>

### signToken

#### Parameters

<TypeList types={[{"name":"data","type":"`string` \\| `object` \\| `Buffer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}  sectionTitle="signToken"/>

#### Returns

<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}  sectionTitle="signToken"/>
