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 refresh JWT token? #362

Closed
matheus2740 opened this issue Apr 10, 2018 · 1 comment
Closed

How to refresh JWT token? #362

matheus2740 opened this issue Apr 10, 2018 · 1 comment

Comments

@matheus2740
Copy link

matheus2740 commented Apr 10, 2018

I was looking into how to refresh the user token from time to time, what is the current best way to do this? I couldn't find anything in the docs. I'm using NbAuthModule and NbAuthJWTToken. I'm not injecting the tokens into my http calls, I'm just subscribing authService.onTokenChange() on my services and getting the token this way, and using it only when needed.
I need to refresh the JWT token from time to time to avoid the user being logged out. By the nature of JWT it's not a very good idea to have long-lived tokens.

@nnixaa
Copy link
Collaborator

nnixaa commented Sep 24, 2018

The issue is resolved.

@nnixaa nnixaa closed this as completed Sep 24, 2018
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

2 participants