我使用nuxt auth模块重定向路由问题

时间:2019-05-10 07:45:38

标签: nuxt

我需要以不同的方式重定向用户和提供者(我有2种身份验证策略)

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 个答案:

没有答案