mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
fix: authentication race condition (#1319)
This commit is contained in:
parent
aecf905642
commit
153268f30d
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import PasswordField from '@/components/Core/PasswordField.vue'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { onMounted, reactive, ref, watchEffect } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { toast } from 'vue3-toastify'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
@ -52,7 +52,9 @@ onMounted(async () => {
|
|||
route.query.password as string
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
if (authStore.isAuthenticated) {
|
||||
redirectOnSuccess()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue