From cda2ef36bdffdad0624af4a37215a91a53e7c0c8 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Mon, 20 Feb 2017 13:11:20 -0700 Subject: [PATCH] remove component pre-route validation we're using a global router guard, there's no need for it in the component --- src/App.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0d1ce00..4d55eb9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -55,16 +55,6 @@ .then(() => this.$router.push({ name: 'login' })); } }, - // pre-route auth checking - beforeRouteEnter(to, from, next) { - // if user is authenticated, continue - if (store.getters.isAuthenticated) return next(); - - // otherwise, redirect to login, preserving the requested route - const { name, fullPath } = to; - const query = (name !== undefined) ? { redirect: name } : { prev: fullPath }; - return next({ name: 'login', query }); - }, }