binding slack user to my app users
See original GitHub issueDescription
HI ,
I’m using you slack/bolt v1.5 to create a slack pp with home tab and i’m using slack user id from ‘app_home_opened’ event to publish home tab and also open model …etc . now to get data from my web app database i need to bind my web app user with slack user . i thought to do the binding while installing slack app ( for example : like google drive slack app installation opened a url for me to authenticate and login by google account) . the issue is that i read about your Outh flow 1- at first when user installs slack app it will send a temp code expires in 10 mins to the predefined redirect_url which will request authorize access to grant an access code .
my question is how to handle a custom url (like the one of google drive ) to users who installs my slack app in order to bind both slack and my web app user’s account .
waiting your reply .
Regards, Marwa
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
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.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
node version:
OS version(s):
Steps to reproduce:
Expected result:
What you expected to happen
Actual result:
What actually happened
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
@MarwaAbuEssa
As Steve mentioned, having the
state
parameter is not mandatory for directory apps at the moment, but I’m happy to know you’re going to implement it for your app! Let me answer your question below.The Slack App configuration page provides your app’s
slack.com/oauth/v2/authorize
(orslack.com/oauth/authorize
for classic apps). It doesn’t have thestate
parameter because the value should be unique per request.A common way to support the
state
parameter would be having a kind of entry point of your Slack app OAuth flow as below.https://your-domain/slack/installation
https://slack.com/oauth/v2/authorize
URL withclient_id
,scopes
, andstate
parametersstate
value on the server-sidehttps://slack.com/oauth/v2/authorize
redirect_uri
underhttps://your-domain
code
andstate
redirect_uri
(sayhttps://your-domain/slack/oauth/callback
)state
parameter firstoauth.v2.access
(oroauth.access
) with thecode
parameterI hope this guide is helpful to you. If it’s clear now, would you close this issue? Thanks for asking questions here. I’m sure this thread will be helpful for others too!
Is this simpler to do now in boltjs 3.1?
I too wish to:
Any help in this regard would be highly appreciated. Any doc that explains this would be awesome! Thank you very much.