Lets a password change end every session opened before it. Tokens are stateless JWTs, so this adds users.tokens_valid_after, and lib/auth.ts refuses a token issued before that time.

Functions

f
up(db: DatabaseSync): void

Run once by runMigrations. Existing users start with NULL, which revokes no token.

Usage

import * as mod from "api/db/migrations/0015_token_revocation.ts";