Skip to content

Commit

Permalink
Adding auth.slack.scope to configuration for scope grant specific…
Browse files Browse the repository at this point in the history
…ation of Slack auth strategy
  • Loading branch information
avoidwork committed Aug 18, 2017
1 parent a0db2d2 commit b10cdac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"enabled": false,
"auth": null,
"client_id": "",
"client_secret": ""
"client_secret": "",
"scope": []
},
"twitter": {
"enabled": false,
Expand Down
3 changes: 2 additions & 1 deletion lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ function auth (obj, config) {
if (config.auth.slack.enabled) {
passport.use(new SlackStrategy({
clientID: config.auth.slack.client_id,
clientSecret: config.auth.slack.client_secret
clientSecret: config.auth.slack.client_secret,
scope: config.auth.slack.scope.length > 0 ? config.auth.slack.scope : void 0
}, (accessToken, refreshToken, profile, done) => {
delay(() => {
config.auth.slack.auth(accessToken, refreshToken, profile, (err, user) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "5.1.6",
"version": "5.1.7",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down

0 comments on commit b10cdac

Please sign in to comment.