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 4 additions and 3 deletions

View File

@@ -36,7 +36,6 @@
"node": ">=10.12"
},
"dependencies": {
"@aoberoi/passport-slack": "1.0.5",
"@azure/storage-blob": "12.2.1",
"@exlinc/keycloak-passport": "1.0.2",
"@joplin/turndown-plugin-gfm": "1.0.27",
@@ -150,6 +149,7 @@
"passport-okta-oauth": "0.0.1",
"passport-openidconnect": "0.0.2",
"passport-saml": "1.3.5",
"passport-slack-oauth2": "1.1.1",
"passport-twitch-oauth": "1.0.0",
"pem-jwk": "2.0.0",
"pg": "8.4.1",

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,

BIN
yarn.lock

Binary file not shown.