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) | Generate a refresh token, bind it with the given user profile + access token, then store them in backend. |
refreshToken(refreshToken) | Refresh the access token bound with the given refresh token. |