Files
n8n-enterprise-unlocked/packages/editor-ui/src/event-bus/mfa.ts
2024-08-13 15:56:54 +03:00

19 lines
454 B
TypeScript

import { createEventBus } from 'n8n-design-system/utils';
export const mfaEventBus = createEventBus();
export interface MfaModalClosedEventPayload {
mfaCode: string;
}
export interface MfaModalEvents {
close: MfaModalClosedEventPayload | undefined;
closed: MfaModalClosedEventPayload | undefined;
}
/**
* Event bus for transmitting the MFA code from a modal back to the view
*/
export const promptMfaCodeBus = createEventBus<MfaModalEvents>();