UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

36 lines (23 loc) 1.22 kB
--- lang: en title: 'API docs: authentication-jwt.refreshtokenservice.generatetoken' 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.generatetoken.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) &gt; [generateToken](./authentication-jwt.refreshtokenservice.generatetoken.md) ## RefreshTokenService.generateToken() method Generate a refresh token, bind it with the given user profile + access token, then store them in backend. **Signature:** ```typescript generateToken(userProfile: UserProfile, token: string): Promise<TokenObject>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | userProfile | [UserProfile](./security.userprofile.md) | | | token | string | | **Returns:** Promise&lt;[TokenObject](./authentication-jwt.tokenobject.md)<!-- -->&gt;