3 ms·
> A typical architecture might have a timestamp stored per user that specifies the earliest token creation date that’s valid for refresh. There's a race condit
by kelnos 7y ago
> A typical architecture might have a timestamp stored per user that specifies the earliest token creation date that’s valid for refresh.
There's a race condition there, though. If you have a revocation event and set the timestamp, it's possible that an in-progress refresh might have a timestamp just slightly after your stored timestamp. Then you have a rogue JWT that can continue to be refreshed.
Clocks are sometimes not in sync with millisecond precision. Databases don't replicate instantly. Distributed systems just don't work that way.
- JamesSwift 7y agoYou could instead store a "generation", and increment on revocation events