无法通过护照松弛对松弛进行身份验证

问题描述 投票:0回答:1

我正在使用passport-slack实现“松弛身份验证”。我只想使用incoming-webhook。我已经设置了“ incoming-webhook”,但出现以下错误:

未请求权限 入网挂钩

代码:

const SlackStrategy = require('passport-slack').Strategy
passport.use(
  new SlackStrategy(
    {
      clientID: config.slack.client_id,
      clientSecret: config.slack.client_secret,
      scope: ['incoming-webhook'],
      skipUserProfile: true   
    },
    (req, profile, done) => {
        // slack data
    }
   )
)

passport.js slack
1个回答
0
投票

我需要在这里设置范围。

app.get('/auth/slack', (req, res, next) => {
  passport.authenticate('slack', { scope: 'incoming-webhook' })(req, res, next)
})
© www.soinside.com 2019 - 2024. All rights reserved.