Add more edge-cases to MFA

This commit is contained in:
Tuan Dang
2023-02-15 01:29:40 +07:00
parent 280f482fc8
commit b710944630
6 changed files with 70 additions and 21 deletions
+4
View File
@@ -6,6 +6,7 @@ export interface ITokenData {
phoneNumber?: string;
organization?: Types.ObjectId;
tokenHash: string;
triesLeft?: number;
expiresAt: Date;
createdAt: Date;
updatedAt: Date;
@@ -37,6 +38,9 @@ const tokenDataSchema = new Schema<ITokenData>({
select: false,
required: true
},
triesLeft: {
type: Number
},
expiresAt: {
type: Date,
expires: 0,