Re:Ask HN: What's the recommended method of adding authentic...
by azernik on Tuesday January 16, 2018 @11:19AM
(#16159271)
The auth framework I use avoids this problem but remains stateless by encrypting/signing the tuple (user ID, session expiration time, maybe other stuff) in a cookie. Essentially it's using the browser as an encrypted one-row database to store the info that would normally be in a sessions table.
[ Parent
| on HN ]
Re:Ask HN: What's the recommended method of adding authentic...
by matwood on Tuesday January 16, 2018 @01:18PM
(#16160538)
This can work, but you want to keep what you send with every request very small. It's also hard to do a mass expiration or revoke a single session. If you have the tokens on the server you can run a query and easily do both. Checking signatures and decrypting on every request can also be a performance issue.