I do not know if it is a good practise, but I think it will be better to get a New token. That ensures you that your token is always Active. Otherwise you must check by yourself if the token was expired and so on
You should use something like JWT for client authorisation. You would have a strategy in place that stores the token in local storage and is retrieved and sent in the header of each request.
Top comments (5)
I do not know if it is a good practise, but I think it will be better to get a New token. That ensures you that your token is always Active. Otherwise you must check by yourself if the token was expired and so on
It is so straightforward. Use a library like github.com/7leads/ngx-cookie-service and specify your question if something is unclear. :)
You should use something like JWT for client authorisation. You would have a strategy in place that stores the token in local storage and is retrieved and sent in the header of each request.
Storing a token in local storage is a security risk. rdegges.com/2018/please-stop-using...
Take a look at that its very complete:
blog.angular-university.io/angular...