Browse Source

feat(webapp): autosubmit TOTP verify

Peter Thomassen 2 years ago
parent
commit
57e27018be

+ 1 - 6
www/webapp/src/views/Console/TOTPVerifyDialog.vue

@@ -58,7 +58,7 @@
                     required
                     required
                     :disabled="working"
                     :disabled="working"
                     tabindex="2"
                     tabindex="2"
-                    @finish="focusSubmit"
+                    @finish="verify"
                 />
                 />
               </v-col>
               </v-col>
             </v-row>
             </v-row>
@@ -125,11 +125,6 @@ export default {
     close() {
     close() {
       this.show = false;
       this.show = false;
     },
     },
-    focusSubmit() {
-      setTimeout(() => {
-        this.$refs.submit.$el.focus();
-      });
-    },
     async verify() {
     async verify() {
       if (!this.$refs.form.validate()) {
       if (!this.$refs.form.validate()) {
         return;
         return;

+ 1 - 6
www/webapp/src/views/MFA.vue

@@ -52,7 +52,7 @@
                       required
                       required
                       :disabled="working"
                       :disabled="working"
                       tabindex="2"
                       tabindex="2"
-                      @finish="focusSubmit"
+                      @finish="verify"
                   />
                   />
                 </v-col>
                 </v-col>
               </v-row>
               </v-row>
@@ -112,11 +112,6 @@ export default {
       this.errors.splice(0, this.errors.length);
       this.errors.splice(0, this.errors.length);
       this.errors.push(...digestError(ex, this));
       this.errors.push(...digestError(ex, this));
     },
     },
-    focusSubmit() {
-      setTimeout(() => {
-        this.$refs.submit.$el.focus();
-      });
-    },
     async verify() {
     async verify() {
       if (!this.$refs.form.validate()) {
       if (!this.$refs.form.validate()) {
         return;
         return;