The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/app/2fa/server/code/ICodeCheck.ts

18 lines
452 B

import type { IUser } from '@rocket.chat/core-typings';
export interface IProcessInvalidCodeResult {
codeGenerated: boolean;
codeCount?: number;
codeExpires?: Date[];
emailOrUsername?: string;
}
export interface ICodeCheck {
readonly name: string;
isEnabled(user: IUser, force?: boolean): boolean;
verify(user: IUser, code: string, force?: boolean): Promise<boolean>;
processInvalidCode(user: IUser): Promise<IProcessInvalidCodeResult>;
}