function notifyClients
notifyClients(
userId: string,
event: FederationEvent | { type: "update"; },
clientIds?: string[]
): Promise<void>

Tells each instance user userId signed in to of event, or only those of clientIds: update when their name, email or avatar changed, revoke when their sessions there must end. The routes that change a user call it, and for an update, event may be just the type: the claims are read now. The events are queued in the outbox and their delivery starts at once, after those queued before for the same instance (deliverTo).

Parameters

userId: string
event: FederationEvent | { type: "update"; }
optional
clientIds: string[]

Return Type

Promise<void>

Usage

import { notifyClients } from "api/services/identity-provider-service.ts";