diff --git a/lib/core/auth.js b/lib/core/auth.js index f03222a78..08a878f83 100644 --- a/lib/core/auth.js +++ b/lib/core/auth.js @@ -27,6 +27,11 @@ export default class Auth { if (process.browser) { this.$storage.watchState('loggedIn', loggedIn => { if (!routeOption(this.ctx.route, 'auth', false)) { + //disable redirect on refresh / direct load of a page. + if(loggedIn && !this.ctx.from) { + return + } + this.redirect(loggedIn ? 'home' : 'logout') } })