fix: replace passport-slack implementation (#4369)

This commit replaces the observably defunct @aoberoi/passport-slack
implementation with that of nmaves's passport-slack-oauth2
This commit is contained in:
Étienne
2021-09-01 09:07:34 -07:00
committed by GitHub
parent fd327ae1c9
commit 9864be884d
3 changed files with 20 additions and 55 deletions

View File

@@ -4,7 +4,7 @@
// Slack Account
// ------------------------------------
const SlackStrategy = require('@aoberoi/passport-slack').default.Strategy
const SlackStrategy = require('passport-slack-oauth2').Strategy
const _ = require('lodash')
module.exports = {
@@ -15,8 +15,9 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL,
team: conf.team,
scope: ['identity.basic', 'identity.email', 'identity.avatar'],
passReqToCallback: true
}, async (req, accessToken, scopes, team, extra, { user: userProfile }, cb) => {
}, async (req, accessToken, refreshToken, { user: userProfile }, cb) => {
try {
const user = await WIKI.models.users.processProfile({
providerKey: req.params.strategy,