feat(openid): show error message from query after being redirected from third party

Resolves https://kolaente.dev/vikunja/frontend/issues/2111
This commit is contained in:
kolaente 2022-10-05 18:02:03 +02:00
parent f405b2105b
commit 820db3e96d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -3,6 +3,9 @@
<message variant="danger" v-if="errorMessage">
{{ errorMessage }}
</message>
<message variant="danger" v-if="errorMessageFromQuery" class="mt-2">
{{ errorMessageFromQuery }}
</message>
<message v-if="loading">
{{ $t('user.auth.authenticating') }}
</message>
@ -33,6 +36,7 @@ const authStore = useAuthStore()
const loading = computed(() => authStore.isLoading)
const errorMessage = ref('')
const errorMessageFromQuery = computed(() => route.query.error)
async function authenticateWithCode() {
// This component gets mounted twice: The first time when the actual auth request hits the frontend,