6 ms·
> Of course you design it in such a way, that you can change one of the inputs, which will by definition invalidate the tokens. I was looking at using JWT to a
by pwf 12y ago
> Of course you design it in such a way, that you can change one of the inputs, which will by definition invalidate the tokens.
I was looking at using JWT to avoid a database read when authenticating a request, but in order to get some sort of variable per-user value I'd have to hit the database to get it, no? Doesn't that kind of defeat the purpose?
- hvidgaard 12y agoSaid variable could be in memory, but the point isn't to save DB reads, but to avoid saving data you don't need to. This is a technique to implement the same feature without having to store additional information in your core business logic, that is relatively useless outside of this password reset or user signup. Of course you may want to save this for BI of audit purposes, but then you can (and should) use an appropiate seperate system.
- tripzilch 12y agoNote that the title says avoiding database writes.