Add docs for MFA

This commit is contained in:
Tuan Dang
2023-02-21 16:08:09 +07:00
parent 469d042f4b
commit 7cb6aee3f7
6 changed files with 38 additions and 5 deletions
+10 -3
View File
@@ -17,7 +17,8 @@ export interface IUser {
verifier?: string;
refreshVersion?: number;
isMfaEnabled: boolean;
seenIps: [string];
mfaMethods: boolean;
seenIps: [string]; // TODO 1: email for unseen IPs, TODO 2: move to a central alerting system
}
const userSchema = new Schema<IUser>(
@@ -82,8 +83,14 @@ const userSchema = new Schema<IUser>(
type: Boolean,
default: false
},
seenIps: [String]
},
mfaMethods: [{
type: String
}],
seenIps: {
type: [String],
default: []
}
},
{
timestamps: true
}