We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2497cc0 commit 16a7904Copy full SHA for 16a7904
lib/core/auth.js
@@ -40,7 +40,7 @@ export default class Auth {
40
await this.mounted()
41
42
// Watch for loggedIn changes only in client side
43
- if (process.browser) {
+ if (process.browser && this.options.watchLoggedIn) {
44
this.$storage.watchState('loggedIn', loggedIn => {
45
if (!routeOption(this.ctx.route, 'auth', false)) {
46
this.redirect(loggedIn ? 'home' : 'logout')
lib/module/defaults.js
@@ -13,6 +13,8 @@ module.exports = {
13
14
fullPathRedirect: false,
15
16
+ watchLoggedIn: true,
17
+
18
redirect: {
19
login: '/login',
20
logout: '/',
0 commit comments