We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37d3959 commit 2071b3cCopy full SHA for 2071b3c
src/Adapters/Auth/mfa.js
@@ -269,22 +269,20 @@ class MFAAdapter extends AuthAdapter {
269
if (req.master) {
270
return;
271
}
272
+
273
+ let type;
274
if (this.totp && authData.secret) {
- return {
- status: 'enabled',
275
- type: 'TOTP',
276
- };
+ type = 'TOTP';
+ } else if (this.sms && authData.mobile) {
277
+ type = 'SMS';
278
+ } else if (this.email && authData.email) {
279
+ type = 'EMAIL';
280
- if (this.sms && authData.mobile) {
281
- type: 'SMS',
282
283
- }
284
- if (this.email && authData.email) {
+ if (type) {
285
return {
286
status: 'enabled',
287
- type: 'EMAIL',
+ type,
288
};
289
290
0 commit comments