Skip to content

Commit

Permalink
feat: if mfa challenges has only one challenge redirect to it
Browse files Browse the repository at this point in the history
  • Loading branch information
ayZagen committed Apr 29, 2020
1 parent 1277fa5 commit fdfff01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ui/views/mfa/Challenge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@

<script lang="ts">
import { defineComponent } from 'vue';
import { Router } from 'vue-router';
export default defineComponent( {
name: 'Challenge',
beforeCreate() {
const challenges = this['context'].details.challenges
if(challenges?.length === 1){
(this['$router'] as Router).replace({ name: challenges[0] })
}
}
})
</script >
Expand Down

0 comments on commit fdfff01

Please sign in to comment.