You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why the token should be change at every request (from a security point of view)?
The longer a token is valid, the longer an attacker has to exploit it. But you can disable this feature if you want.
Why the token (a hash of it) is stored in the database?
The user's access may be revoked or changed between requests. So we must check with the DB on each request. The tokens are hashed for the same reason that passwords are hashed.
I'm a bit confuse about the design of this authentication system.
The text was updated successfully, but these errors were encountered: