function revokeSessions
revokeSessions(
userId: string,
at: Date,
reason: string
): void

Ends every session of user userId opened before at, closing their sockets with reason: their tokens stop counting (users.tokens_valid_after, which getSessionState reads). A password change calls it, and so does the sign-out of a user from another instance, when that instance says so or an admin blocks it.

Parameters

userId: string
at: Date
reason: string

Return Type

void

Usage

import { revokeSessions } from "api/services/user-service.ts";