3 ms·
To echo the other response, we use jwt and only periodically check the DB. We "soft expire" and renew the tokens every 15 minutes. Which means that a user could
by jjeaff 9y ago
To echo the other response, we use jwt and only periodically check the DB. We "soft expire" and renew the tokens every 15 minutes. Which means that a user could conceivably work for 15 minutes without hitting the auth tables at all. After that 15, we don't require that their token be replaced, but a "soft expired" token will require checking the DB on each call.
Then of course a hard expire from the DB (as in, it no longer exists) will cause an auth rejection.
But the best part is having a few bits of key data like user id stored in the key that can be trusted without calling the database.