basalt / auth/src / MemoryTokenVersionStore
Class: MemoryTokenVersionStore
Defined in: auth/src/stores.ts:385
Per-user access-token version. Access tokens carry the version they were minted at; bumping it (on password reset or an explicit "log out everywhere") invalidates every access token issued before the bump — the missing piece for revoking stateless JWTs before they expire. Opt-in via authPlugin.
Implements
Constructors
Constructor
> new MemoryTokenVersionStore(): MemoryTokenVersionStore
Returns
MemoryTokenVersionStore
Methods
get()
> get(userId): Promise<number>
Defined in: auth/src/stores.ts:388
Current version for the user (0 if never bumped).
Parameters
userId
string
Returns
Promise<number>
Implementation of
increment()
> increment(userId): Promise<number>
Defined in: auth/src/stores.ts:391
Bump the version and return the new value.
Parameters
userId
string
Returns
Promise<number>