feathers
feathers copied to clipboard
How to generate a never expired jwt token for some strategies or services?
I want to have three login strategies which could generate token with different expired time:
- Employee for 1 week
- Visitor for 1 hour
- Manager forever
I failed to generate a never expired token because the default option is '1d' which can be overridden to another value but cannot be deleted.
So I tried another approach using ignoreExpiration option for some of my services in hooks:
authenticate('jwt', {ignoreExpiration: true})
It doesn't work either. How can I achieve this? The version is v3 buzzard.