Add OAuth support to bolt
See original GitHub issueDescription
Let’s add OAuth support to bolt!
It can use the new OAuth package we’ve been developing at https://github.com/slackapi/node-slack-sdk/pull/963.
The idea being, when you are initializing your app, by passing in a few new options, bolt would automatically setup a route for direct install and a route for oauth redirect. It would also take care of creating a state param for you and exchanging that + the code
for an access token. Lastly, it will provide an interface to plug your own database solution to store and retrieve access tokens and other installation related info.
const app = new App({
signingSecret: process.env.SLACK_SIGNING_SECRET,
clientId: process.env.SLACK_CLIENT_ID,
clientSecret: process.env.SLACK_CLIENT_SECRET,
stateSecret: 'my-state-secret',
scopes: ['channels:read', 'groups:read', 'channels:manage', 'chat:write'],
metadata: 'some_metadata',
});
What type of issue is this? (place an x
in one of the [ ]
)
- enhancement (feature request)
Requirements (place an x
in each of the [ ]
)
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
OAuth at Bolt | Bolt Help
Bolt leverages OAuth 2.0's authorization code grant flow to grant access tokens and refresh tokens on behalf of Bolt Account users.
Read more >Build your first Slack Bolt App Pt 3: OAuth & Storing ... - YouTube
Code: https://github.com/horeaporutiu/ oauth -sample/tree/part3-authBolt JS Framework code: ...
Read more >Bolt for Python - Slack Platform Developer Tools
Bolt for Python supports and will handle token rotation automatically so long as the built-in OAuth functionality is used. For more information about...
Read more >Slack Bot with Bolt for JavaScript and OAuth 2.0 to share the ...
I made it to add an app with an Add to Slack Button using Bolt for Javascript. The Slack commands don't work yet,...
Read more >Build Slack apps in a flash
And Bolt offers OAuth support, which handles the “Add to Slack” flow, making token storage and access for multi-team installations simpler.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@realappie see my answer at https://github.com/slackapi/bolt-js/issues/583#issuecomment-675636574
@stevengill Do you have a fully working example of this anywhere? I pretty much wrote everything in the documentation regarding oauth here. Without any success 😕 I have also tried the install link without any success. I also currently have a working setup with a custom express route, but would love to switch over to the built-in implementation.
My custom implementation
This is perhaps useful to share for anyone that can't get the built-in implementation to work either.And wherever you’re creating a new slack
App
do the following