From b876a4d4dc3c554f87815a3cf42ffb478022be6b Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 12 May 2020 15:17:47 +0200 Subject: [PATCH] Fix redirecting for unauthenticated pages to login --- src/App.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index b1818ca5..282bbdfe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -267,7 +267,14 @@ }, beforeCreate() { // Check if the user is already logged in, if so, redirect them to the homepage - if (!this.userAuthenticated && this.$route.name !== 'login') { + if ( + !this.userAuthenticated && + this.$route.name !== 'login' && + this.$route.name !== 'getPasswordReset' && + this.$route.name !== 'passwordReset' && + this.$route.name !== 'register' && + this.$route.name !== 'linkShareAuth' + ) { router.push({name: 'login'}) } },