Different redirect routes for different strategies

Gor98
0
Gor98
commented 2 years ago

HI,
have an problem with redirect routes. How can I set different redirect rout for
different auth strategies in my nuxt.config.js
This is my config file.

  auth: {
    redirect: {
      login: '/',
      logout: '/',
      callback: '/',
      home: '/'
    },
    strategies: {
      user: {
        _scheme: 'local',
        endpoints: {
          login: { url: '/user/signin', method: 'post', propertyName: 'access_token' },
          logout: { url: '/user/logout', method: 'get' },
          user: { url: '/user/details', method: 'get', propertyName: 'user' }
        },
        tokenType: 'Bearer',
      },
      provider: {
        _scheme: 'local',
          endpoints: {
            login: { url: '/provider/signin', method: 'post', propertyName: 'access_token' },
            logout: { url: '/provider/logout', method: 'get' },
            user: { url: '/provider/profile', method: 'get', propertyName: 'user' }
          },
          tokenType: 'Bearer',
      },

    },
  },
0
Informations
QuestionUnresolved
#c148 - Created 2 years ago