我正在使用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
}
)
)
我需要在这里设置范围。
app.get('/auth/slack', (req, res, next) => {
passport.authenticate('slack', { scope: 'incoming-webhook' })(req, res, next)
})