Page Contents
Home > @loopback/authentication-jwt > RefreshTokenService > generateToken
RefreshTokenService.generateToken() method
Generate a refresh token, bind it with the given user profile + access token, then store them in backend.
Signature:
generateToken(userProfile: UserProfile, token: string): Promise<TokenObject>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| userProfile | [UserProfile](/doc/en/lb4/apidocs.security.userprofile.html) | |
| token | string |
Returns:
Promise<TokenObject>