Skip to content

Commit 79fa5b7

Browse files
authored
Merge pull request #145 from vevinkirk/main
updating to use new passport-slack-oauth2
2 parents 632f3da + d124848 commit 79fa5b7

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

trainingportal/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ catch(ex){/*Do nothing*/}
5555

5656

5757
var GoogleStrategy = require('passport-google-oauth20').Strategy;
58-
var SlackStrategy = require('passport-slack').Strategy;
58+
var SlackStrategy = require('passport-slack-oauth2').Strategy;
5959
var LocalStrategy = require('passport-local').Strategy;
6060
var SamlStrategy = require('passport-saml').Strategy;
6161
var LdapStrategy = require('passport-ldapauth').Strategy;
@@ -600,4 +600,4 @@ module.exports = {
600600
processAuthCallback,
601601
registerLocalUser,
602602
updateLocalUser
603-
}
603+
}

trainingportal/package-lock.json

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

trainingportal/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"passport-local": "^1.0.0",
4141
"passport-saml": "^2.2.0",
4242
"passport-slack": "0.0.7",
43+
"passport-slack-oauth2": "^1.2.0",
4344
"popper": "^1.0.1",
4445
"sqlite3": "^5.1.2",
4546
"uid-safe": "^2.1.4",

trainingportal/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ app.get( '/public/google/callback', passport.authenticate( 'google', {
170170

171171

172172
// path for slack auth
173-
app.get('/public/slack', passport.authenticate('slack'));
173+
app.get('/public/slack', passport.authenticate('Slack'));
174174

175175
// OAuth callback url
176-
app.get( '/public/slack/callback', passport.authenticate( 'slack', {
176+
app.get( '/public/slack/callback', passport.authenticate( 'Slack', {
177177
successRedirect: '/main',
178178
failureRedirect: '/public/authFail.html'
179179
}));

0 commit comments

Comments
 (0)