feathers icon indicating copy to clipboard operation
feathers copied to clipboard

How to generate a never expired jwt token for some strategies or services?

Open elixiao opened this issue 5 years ago • 0 comments

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.

elixiao avatar Nov 20 '19 09:11 elixiao