Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elixiao opened this issue Nov 20, 2019 · 0 comments
Open

Comments

@elixiao
Copy link

elixiao commented Nov 20, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant