Fix redirecting for unauthenticated pages to login
This commit is contained in:
parent
0dc4e6b95d
commit
b876a4d4dc
1 changed files with 8 additions and 1 deletions
|
@ -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'})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue