From 807fb6a9fe404f65f0616aac78f707cd6e4ade5d Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 12 Dec 2021 12:20:33 +0100 Subject: [PATCH] fix: use watcher to check for user query tokens --- src/App.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5eacb532..84578bf5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -48,9 +48,6 @@ export default defineComponent({ }, beforeMount() { this.setupOnlineStatus() - this.setupPasswortResetRedirect() - this.setupEmailVerificationRedirect() - this.setupAccountDeletionVerification() }, beforeCreate() { setLanguage() @@ -64,6 +61,18 @@ export default defineComponent({ this.$router.push({name: 'home'}) } }, + watch: { + // Calling these methods in the mounted hook directly does not work. + '$route.query.accountDeletionConfirm'() { + this.setupAccountDeletionVerification() + }, + '$route.query.userPasswordReset'() { + this.setupPasswortResetRedirect() + }, + '$route.query.userEmailConfirm'() { + this.setupEmailVerificationRedirect() + }, + }, computed: { isTouch() { return isTouchDevice()