Fix redirecting for unauthenticated pages to login
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-05-12 15:17:47 +02:00
parent 0dc4e6b95d
commit b876a4d4dc
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 8 additions and 1 deletions

View File

@ -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'})
}
},