No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Error 'Uncaught (in promise)' in router guard (boot/router-auth.js)

    Help
    2
    2
    367
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mx last edited by

      export default ({ router }) => {
        router.beforeEach((to, from, next) => {
          const isTokenValid = false // temp
      
          if (!isTokenValid && to.path !== '/login') {
            next('/login')  // GOT ERROR IN THIS LINE
          } else {
            next()
          }
        })
      }
      

      How can I fix it?

      1 Reply Last reply Reply Quote 0
      • O
        ouaR last edited by

        read this.
        https://github.com/vuejs/vue-router/issues/2881#issuecomment-520554378

        1 Reply Last reply Reply Quote 0
        • First post
          Last post