{"_id":"passport-slack","_rev":"15-627e943bcd445935fa0cd705c75c8324","name":"passport-slack","description":"Slack OAuth2 strategy for Passport.","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"passport-slack","version":"0.0.1","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"homepage":"https://github.com/mjpearson/passport-slack","_id":"passport-slack@0.0.1","dist":{"shasum":"16551410581c0039af6d0e150ce9c3c04b8e1f62","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.1.tgz","integrity":"sha512-qfpIP+1zde5zgBG1rKJHgHViTjvOz42V6rgSshMX52sX1jabjobyePBaF3PdvBq/4Rg5zd980xjlYB6n/APSPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGZJrB+0wPupuG/gIK4y6dvCrfKjdJJ1BX6oiXXL1DnwIgOVIbC7RVTDJgfnG8/dkkiUqxWQcnIOpofAC22t2zKZM="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"cloudspark","email":"accounts@cloudspark.com.au"},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"}],"directories":{}},"0.0.2":{"name":"passport-slack","version":"0.0.2","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"4fc697277f8af545a626832f8d1b238747805d89","homepage":"https://github.com/mjpearson/passport-slack","_id":"passport-slack@0.0.2","scripts":{},"_shasum":"963d93cc9a371315dc435d9d422bae13c7934932","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.31","_npmUser":{"name":"mjpearson","email":"npm@m.bip.io"},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"dist":{"shasum":"963d93cc9a371315dc435d9d422bae13c7934932","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.2.tgz","integrity":"sha512-5hD1NzY/0bbEl0Fdh1NMM30KaEZztAN58J/crQLBqtovxTOmXTivssk5lgXtJKRrjUC7QeRPjEdi5yLSsGNN/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQZv3jfRITOqBLfWjsl4XP3HdEbLyYXiMiNbdjxAXWGAIgS2vLFLPpjBmuJtvPjffwF4iIwfrKZyXzTgp0Ae1yWD4="}]},"directories":{}},"0.0.3":{"name":"passport-slack","version":"0.0.3","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"c77342c8a1389426cdde932d25de6a4f1906c57a","homepage":"https://github.com/mjpearson/passport-slack#readme","_id":"passport-slack@0.0.3","scripts":{},"_shasum":"28ed5c89c36fa1b05c1dc8e80ce1aec38f362dfa","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"mjpearson","email":"npm@m.bip.io"},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"dist":{"shasum":"28ed5c89c36fa1b05c1dc8e80ce1aec38f362dfa","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.3.tgz","integrity":"sha512-Ouim4IMCrleemVopcwtrhYbiS6+urSMz1lSismaOGE7rX69kiaBKxo3ZOUlO3xInbo9O3JfqBItz0ogCYtOHzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpGke1+0HBhQ5xH6fzqmiKEa7ku1yEhKRyZ16g+opAtQIgMBTOgkMCNAH5MWtVpVoWnzlNKrpYS0iRuF/CADhPbwI="}]},"directories":{}},"0.0.4":{"name":"passport-slack","version":"0.0.4","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"f574ca87a1d08822fa79176977de88314a4ed029","homepage":"https://github.com/mjpearson/passport-slack#readme","_id":"passport-slack@0.0.4","scripts":{},"_shasum":"411e9faab174ef0d5706a9f4118c8f4b167d1a99","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"mjpearson","email":"npm@m.bip.io"},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"dist":{"shasum":"411e9faab174ef0d5706a9f4118c8f4b167d1a99","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.4.tgz","integrity":"sha512-eXsYj2wbZPzicfKr0q1uAQh59QC2Lwl9ZGNO+B7HNHBd/RytiFmCSlqk78uLe6odqueEWY/3tmMaqHL8zxapNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQjp/4dkCRtNpQudRXEGeOlWzdR9NceG0PTN5u3Op0DgIhAKHGeGkhG7itQkVbYqEcsMvIEH3rDra6NwkMED8AdwP0"}]},"directories":{}},"0.0.5":{"name":"passport-slack","version":"0.0.5","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"dbcde53fb429746a0c6e3389c65cef8986c9f744","homepage":"https://github.com/mjpearson/passport-slack#readme","_id":"passport-slack@0.0.5","scripts":{},"_shasum":"1e6e8aa20e9d554b024ee64e009845ded3a3cf21","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"mjpearson","email":"mjpearson@gmail.com"},"dist":{"shasum":"1e6e8aa20e9d554b024ee64e009845ded3a3cf21","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.5.tgz","integrity":"sha512-k6CudHNaXZggo0bkgJPWsl9GdZhl1kG1cXWfK2v5OeC+ApOd+pqfK0fA3IgiRKFRCU5A5N8lA82lpeDE8sTM4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACiYZYMnnWoDyY6wtn0j8s91w2C0SsEMps0F/zcjhUOAiEAkqYfkuS9dMfNaIwh2FDviy+slZrj4nZItF/y46uZOzs="}]},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/passport-slack-0.0.5.tgz_1460470397919_0.3760820892639458"},"directories":{}},"0.0.6":{"name":"passport-slack","version":"0.0.6","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"86e3809cdf155b831eac240f5bc4c31ba77d4483","homepage":"https://github.com/mjpearson/passport-slack#readme","_id":"passport-slack@0.0.6","scripts":{},"_shasum":"78ab5ce77754cd669d572fc37b703fa026c28864","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"mjpearson","email":"mjpearson@gmail.com"},"dist":{"shasum":"78ab5ce77754cd669d572fc37b703fa026c28864","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.6.tgz","integrity":"sha512-TF2rdbC8EaHoImYxW6U434+vEMPS6fCtamHHzVpuMDT/Lrb3PQUPLvZ9Frb551kK/cVW4L8eu/KQv8vTc4WPTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxdQvVPjSTovASil1sklfrABAIDN//Mst78cFkxxVg2AIhAIdlcHbAM8NsNGNRS1l4tt4DknDQyJGKa6+zotGzgEtE"}]},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/passport-slack-0.0.6.tgz_1460470472567_0.027633734978735447"},"directories":{}},"0.0.7":{"name":"passport-slack","version":"0.0.7","description":"Slack OAuth2 strategy for Passport.","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-slack","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.1"},"engines":{"node":">= 0.4.0"},"gitHead":"0d1d285d14e5df091af631ee786c7e779bb2a19a","homepage":"https://github.com/mjpearson/passport-slack#readme","_id":"passport-slack@0.0.7","scripts":{},"_shasum":"167eb80f0ab622d2156e7cae7055e16d0b1890d0","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"mjpearson","email":"mjpearson@gmail.com"},"dist":{"shasum":"167eb80f0ab622d2156e7cae7055e16d0b1890d0","tarball":"https://registry.npmjs.org/passport-slack/-/passport-slack-0.0.7.tgz","integrity":"sha512-E9WDCfd1GO/2zYCz3L1MZcB0eYHTHB6yBi9lRkK+LFBl1p6wcV7pGF6+Vb+XLVq1G6+TLSJCTAxcW5O0rvE4/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZed1QSm2y4vW+a8+78OXU2VhfqSBfOlR66hPnObJXfQIgQG3tddSEPT0VCO+q4ZeVr1O14zzXTbBULuKJKSzq7tk="}]},"maintainers":[{"name":"cloudspark","email":"accounts@cloudspark.com.au"},{"name":"mjpearson","email":"npm@m.bip.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/passport-slack-0.0.7.tgz_1480692754740_0.30825560819357634"},"directories":{}}},"readme":"# passport-slack\n\n[Passport](https://github.com/jaredhanson/passport) strategy for authenticating\nwith [Slack](https://slack.com) using the OAuth 2.0 API.\n\nUpdated to support Sign in with Slack by default.<br>\n[![Sign in with Slack](https://a.slack-edge.com/accd8/img/sign_in_with_slack.png)](https://api.slack.com/docs/sign-in-with-slack#identify_users_and_their_teams)\n\n## Notice\n\nThis repository is not getting the love it deserves. If you're interested in taking over maintenance or ownership of this repo and npm, please reach me (Mike Pearson) at github@x0rz.com\n\n## Install\n```shell\n$ npm install passport-slack\n```\n\n## Express Example\n```js\nconst {CLIENT_ID, CLIENT_SECRET, PORT} = process.env,\n      SlackStrategy = require('passport-slack').Strategy,\n      passport = require('passport'),\n      express = require('express'),\n      app = express();\n\n// setup the strategy using defaults \npassport.use(new SlackStrategy({\n    clientID: CLIENT_ID,\n    clientSecret: CLIENT_SECRET\n  }, (accessToken, refreshToken, profile, done) => {\n    // optionally persist profile data\n    done(null, profile);\n  }\n));\n\napp.use(passport.initialize());\napp.use(require('body-parser').urlencoded({ extended: true }));\n\n// path to start the OAuth flow\napp.get('/auth/slack', passport.authorize('slack'));\n\n// OAuth callback url\napp.get('/auth/slack/callback', \n  passport.authorize('slack', { failureRedirect: '/login' }),\n  (req, res) => res.redirect('/')\n);\n\napp.listen(PORT);\n```\n\n## Sample Profile\n```json\n{\n    \"provider\": \"Slack\",\n    \"id\": \"U123XXXXX\",\n    \"displayName\": \"John Agan\",\n    \"user\": {\n        \"name\": \"John Agan\",\n        \"id\": \"U123XXXXX\",\n        \"email\": \"johnagan@testing.com\",\n        \"image_24\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=24&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0000-24.png\",\n        \"image_32\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=32&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0000-32.png\",\n        \"image_48\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0000-48.png\",\n        \"image_72\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0000-72.png\",\n        \"image_192\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=192&d=https%3A%2F%2Fa.slack-edge.com%2F7fa9%2Fimg%2Favatars%2Fava_0000-192.png\",\n        \"image_512\": \"https://secure.gravatar.com/avatar/123abcd123bc12b3c.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2F7fa9%2Fimg%2Favatars%2Fava_0000-512.png\"\n    },\n    \"team\": {\n        \"id\": \"T123XXXX\",\n        \"name\": \"My Awesome Team\",\n        \"domain\": \"my-awesome-team\",\n        \"image_34\": \"https://a.slack-edge.com/0000/img/avatars-teams/ava_0000-00.png\",\n        \"image_44\": \"https://a.slack-edge.com/00a0/img/avatars-teams/ava_0000-00.png\",\n        \"image_68\": \"https://a.slack-edge.com/00a0/img/avatars-teams/ava_0000-00.png\",\n        \"image_88\": \"https://a.slack-edge.com/00a0/img/avatars-teams/ava_0000-00.png\",\n        \"image_102\": \"https://a.slack-edge.com/00a0/img/avatars-teams/ava_0000-000.png\",\n        \"image_132\": \"https://a.slack-edge.com/00a0/img/avatars-teams/ava_0000-000.png\",\n        \"image_230\": \"https://a.slack-edge.com/0a0a0/img/avatars-teams/ava_0000-000.png\",\n        \"image_default\": true\n    }\n}\n\n```\n\n## Usage\n\n### Configure Strategy\n\nThe Slack authentication strategy authenticates users using a Slack\naccount and OAuth 2.0 tokens.  The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a client ID, client secret, and callback URL.\n\n```js\npassport.use(new SlackStrategy({\n    clientID: CLIENT_ID,\n    clientSecret: CLIENT_SECRET,\n    skipUserProfile: false, // default\n    scope: ['identity.basic', 'identity.email', 'identity.avatar', 'identity.team'] // default\n  },\n  (accessToken, refreshToken, profile, done) => {\n    // optionally persist user data into a database\n    done(null, profile);\n  }\n));\n```\n\n### Authenticate Requests\n\nUse `passport.authorize()` (or `passport.authenticate()` if you want to authenticate with Slack and affect `req.user` and user session), specifying the `'slack'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```js\napp.get('/auth/slack', passport.authorize('slack'));\n\napp.get('/auth/slack/callback',\n  passport.authorize('slack', { failureRedirect: '/login' }),\n  (req, res) => res.redirect('/') // Successful authentication, redirect home.\n);\n```\n\n### Custom Scopes\nBy default passport-slack strategy will try to retrieve [all user identity](https://api.slack.com/methods/users.identity) from Slack using the default scopes of `identity.basic`, `identity.email`, `identity.avatar`, and `identity.team`. To override these, set the `scope` parameter to an array of scopes.\n\n```js\npassport.use(new SlackStrategy({\n\tclientID: CLIENT_ID,\n\tclientSecret: CLIENT_SECRET,\n\tscope: ['identity.basic', 'channels:read', 'chat:write:user']\n}, () => { });\n```\n\n### Ignore Profile Info\nIf you just need an access token and not user profile data, you can avoid getting profile info by setting `skipUserProfile` to true.\n```js\npassport.use(new SlackStrategy({\n\tclientID: CLIENT_ID,\n\tclientSecret: CLIENT_SECRET,\n\tscope: ['incoming-webhook'],\n\tskipUserProfile: true\n}, () => { });\n```\n\n## Thanks\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2014 [Michael Pearson](http://github.com/mjpearson)\n","maintainers":[{"email":"aoberoi@gmail.com","name":"aoberoi"},{"email":"accounts@cloudspark.com.au","name":"cloudspark"},{"email":"mjpearson@gmail.com","name":"mjpearson"}],"time":{"modified":"2022-06-23T13:29:40.409Z","created":"2014-05-27T23:40:46.266Z","0.0.1":"2014-05-27T23:40:46.266Z","0.0.2":"2015-06-25T14:44:50.459Z","0.0.3":"2015-07-13T22:12:41.572Z","0.0.4":"2015-08-24T19:21:30.171Z","0.0.5":"2016-04-12T14:13:20.726Z","0.0.6":"2016-04-12T14:14:34.218Z","0.0.7":"2016-12-02T15:32:36.751Z"},"homepage":"https://github.com/mjpearson/passport-slack#readme","keywords":["passport","slack","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/mjpearson/passport-slack.git"},"bugs":{"url":"http://github.com/mjpearson/passport-slack/issues"},"readmeFilename":"README.md","users":{"nelix":true,"mikestaub":true,"rocket0191":true}}