Unverified Commit 9864be88 authored by Étienne's avatar Étienne Committed by GitHub

fix: replace passport-slack implementation (#4369)

This commit replaces the observably defunct @aoberoi/passport-slack implementation with that of nmaves's passport-slack-oauth2
parent fd327ae1
......@@ -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",
......
......@@ -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,
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment