diff --git a/src/App.vue b/src/App.vue index 61f0137535..b1818ca5fb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -265,6 +265,12 @@ router.push({name: 'login'}) } }, + beforeCreate() { + // Check if the user is already logged in, if so, redirect them to the homepage + if (!this.userAuthenticated && this.$route.name !== 'login') { + router.push({name: 'login'}) + } + }, created() { this.$store.dispatch('config/update') this.$store.dispatch('auth/checkAuth') diff --git a/src/components/Home.vue b/src/components/Home.vue index b16d821f6f..0b59a7937e 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -9,16 +9,19 @@ > Import your data into Vikunja - +