basalt / auth/src / TokenVersionStore
Interface: TokenVersionStore
Defined in: auth/src/stores.ts:378
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.
Methods
get()
> get(userId): Promise<number>
Defined in: auth/src/stores.ts:380
Current version for the user (0 if never bumped).
Parameters
userId
string
Returns
Promise<number>
increment()
> increment(userId): Promise<number>
Defined in: auth/src/stores.ts:382
Bump the version and return the new value.
Parameters
userId
string
Returns
Promise<number>