Search code examples
vue.jsauth0vue-routerstamplay

Handle callback urls in Vue router


I use Stamplay as BaaS, so to authenticate user, I just redirect to

/auth/v1/auth0/connect

After, user authenticate.. the Stamplay call my app with

/login/callback?jwt=abc.123.xyz

How can I authenticate user after Stamplay call my app?

Tried

I my router config I try..

'/login/callback': {
  component: Vue.extend({
    ready() {
      // ...  THIS IS NOT CALLED!! NEVER
      console.log('... ready .. ')
      console.log(this.$route.query.jwt)
    }
  })
}

Solution

  • Try to access this.$route.query.jwt from within the component.