Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't used JWT but the way you solve this is by having a refresh token that lasts several days that lets you "login" without a password. The refresh token is then used to get the real session token with has a low expiration, perhaps 5 minutes. When the session token expires you just "login" again.

But honestly I don't see the need for the vast majority of applications. Most frameworks cache the permissions, etc on login so the database doesn't have to be accessed on every request.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: