Hacker News new | ask | show | jobs
by danielweber 3478 days ago
> Now all token s auto-invalidate after a certain period.

You need to make sure that there is some process that will refuse to keep on re-upping the cookie lifetime. Otherwise an attacker could indefinitely keep the stolen cookie alive.

2 comments

If you see a suspicious usage pattern then force a login by invalidating the tokens. Allowing indefinite refreshing is a feature and a drawback of this method.
You CBS Combine a session cookie with a jwt Token That get sent over a Header
Which gives you the worst of both worlds