---
lang: en
title: 'API docs: authentication-jwt.refreshtokenservice'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/authentication-jwt
permalink: /doc/en/lb4/apidocs.authentication-jwt.refreshtokenservice.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication-jwt](./authentication-jwt.md) &gt; [RefreshTokenService](./authentication-jwt.refreshtokenservice.md)

## RefreshTokenService interface

The token refresh service. An access token expires in limited time. Therefore token refresh service is needed to keep replacing the old access token with a new one periodically.

**Signature:**

```typescript
export interface RefreshTokenService 
```

## Methods

<table><thead><tr><th>

Method


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[generateToken(userProfile, token)](./authentication-jwt.refreshtokenservice.generatetoken.md)


</td><td>

Generate a refresh token, bind it with the given user profile + access token, then store them in backend.


</td></tr>
<tr><td>

[refreshToken(refreshToken)](./authentication-jwt.refreshtokenservice.refreshtoken.md)


</td><td>

Refresh the access token bound with the given refresh token.


</td></tr>
</tbody></table>

