nuxt-community / nuxtent-module

Seamlessly use content files in your Nuxt.js sites.
https://nuxtent-module.netlify.com/guide
MIT License
389 stars 50 forks source link

Different redirect routes for different strategies #217

Closed Gor98 closed 5 years ago

Gor98 commented 5 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',
      },

    },
  },
This question is available on Nuxt community (#c148)
ghost commented 5 years ago

This issue as been imported as question since it does not respect nuxtent-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload. If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically. Your question is available at https://cmty.app/nuxt/nuxtent-module/issues/c148.