File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 28
28
/>
29
29
</div >
30
30
31
- <div v-if =" requires2FA" class =" field" >
31
+ <div
32
+ v-if =" requires2FA"
33
+ class =" field"
34
+ >
32
35
<InputText
33
36
v-model =" totp"
34
37
:placeholder =" t('Enter 2FA code')"
82
85
83
86
<script setup>
84
87
import { computed , ref } from " vue"
88
+ import { useRouter } from " vue-router"
85
89
import Button from " primevue/button"
86
90
import InputText from " primevue/inputtext"
87
91
import Password from " primevue/password"
@@ -92,6 +96,9 @@ import LoginOAuth2Buttons from "./login/LoginOAuth2Buttons.vue"
92
96
import { usePlatformConfig } from " ../store/platformConfig"
93
97
94
98
const { t } = useI18n ()
99
+
100
+ const router = useRouter ()
101
+
95
102
const platformConfigStore = usePlatformConfig ()
96
103
const allowRegistration = computed (() => " false" !== platformConfigStore .getSetting (" registration.allow_registration" ))
97
104
@@ -116,7 +123,7 @@ async function onSubmitLoginForm() {
116
123
if (response .requires2FA ) {
117
124
requires2FA .value = true
118
125
} else {
119
- router .replace ({ name: " Home" })
126
+ await router .replace ({ name: " Home" })
120
127
}
121
128
}
122
129
</script >
You can’t perform that action at this time.
0 commit comments