Page Contents
Home > @loopback/authentication-jwt > RefreshTokenService
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:
export interface RefreshTokenService
Methods
| Method | Description |
|---|---|
| [generateToken(userProfile, token)](/doc/en/lb4/apidocs.authentication-jwt.refreshtokenservice.generatetoken.html) | Generate a refresh token, bind it with the given user profile + access token, then store them in backend. |
| [refreshToken(refreshToken)](/doc/en/lb4/apidocs.authentication-jwt.refreshtokenservice.refreshtoken.html) | Refresh the access token bound with the given refresh token. |