I am creating token based authentication (Node.js using passport / JWT with angular client).
After the user enters his credentials, he receives an access token, which he sends for each request inside the header (header: channeler TOKEN).
I do not want to request an entry request every time its access token expires (approximately every day, I think), I heard about Update tokens . The update current never expires (or rarely expires) and can update tokens indefinitely. When the access token expires, the client can send an update request to receive a new access token by sending an update token.
I understand a little, maybe something is missing:
How long-lived / never-expiring update tokens do not compromise the security of short-lived access tokens.
Cookies can be stolen and used before they expire. Tokens are short, so they are more secure, but if I provide the long-awaited update token, I lose the advantage of using tokens.
NOTE. I know that update tokens are sent at the initial login, so they cannot be tampered with in every request, but if they are tampered with at the initial request, they are vulnerable.
Aviran Cohen Dec 08 '14 at 13:27 2014-12-08 13:27
source share