feathers-refresh-token
open-source
Refresh tokens hooks for Feathers
Forked from TheSinding/authentication-refresh-token There are three major differences of my implementation:
- Implement refresh token via Feathers standalone service
- The form of refresh token is actual JWT
- Support all authentication strategies (local, oAuth)
- Support multi-devices login
Key features
Leveraging existing Feathers built-in authentication service and JWT support to implement refresh token functionalities via couple hooks:
- issueRefreshToken - issuing refresh token after user authenticated successfully and save it via custom refresh-tokens service
- refreshAccessToken - issuing new access token by making a POST request to /refresh-tokens endpoint along with user Id and a valid refresh token
- revokeRefreshToken - revoke refresh token by making PATCH request to /refresh-tokens endpoint
- logoutUser - remove the refresh token by making a DELETE request to /refresh-tokens endpoint