Skip to content

Automatic login and logout redirection ignores page guarded state#52

Description

@breakingrobot

Originally reported by @pi0 馃巻

watchLoggedIn () {
    this._loggedInWatcher =
      this._loggedInWatcher ||
      this.$store.watch(
        state => state[this.options.namespace]['loggedIn'],
        () => {
          this.redirect('home')
        }
      )
    return this._loggedInWatcher
}

State watcher ignores completely about the current page guarded state and will automatically redirect you to login page even if you current page is not guarded by authentication.

This bug report is available on Nuxt.js community (#c37)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions