Skip to content

Commit 78bb2da

Browse files
committed
fix: correct skip setup logic to prevent skipping if user is not allowed
1 parent 771710d commit 78bb2da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
3131
if (this.options.usersFilterToAllowSkipSetup) {
3232
const res = await this.options.usersFilterToAllowSkipSetup(adminUser); // recieve result of usersFilterToAllowSkipSetup
3333
if (res === false) { // if false, user is not allowed to skip anyway, so doesn't matter if they have 2FA set up or not
34-
return { skipAllowed: true };
34+
return { skipAllowed: false };
3535
}
3636

3737
//recieve user's record

0 commit comments

Comments
 (0)