function closeUserSockets
closeUserSockets(
userId: string,
reason: string
): void

Closes every socket of userId without signing anyone out. The user service calls it on a password change. Each tab reconnects with the token it holds: the tab that made the change has a fresh one and stays signed in, while the others connect anonymously and sign out on their next 401.

Parameters

userId: string
reason: string

Return Type

void

Usage

import { closeUserSockets } from "api/services/ws-service.ts";