Files
outline/server/queues/processors/UserSuspendedProcessor.ts
T
Tom Moor a06671e8ce OAuth provider (#8884)
This PR contains the necessary work to make Outline an OAuth provider including:

- OAuth app registration
- OAuth app management
- Private / public apps (Public in cloud only)
- Full OAuth 2.0 spec compatible authentication flow
- Granular scopes
- User token management screen in settings
- Associated API endpoints for programatic access
2025-05-03 19:40:18 -04:00

15 lines
478 B
TypeScript

import { OAuthAuthentication } from "@server/models";
import { Event as TEvent, UserEvent } from "@server/types";
import BaseProcessor from "./BaseProcessor";
export default class UserSuspendedProcessor extends BaseProcessor {
static applicableEvents: TEvent["name"][] = ["users.suspend"];
async perform(event: UserEvent) {
// Remove all OAuth authentications for this user.
await OAuthAuthentication.destroy({
where: { userId: event.userId },
});
}
}