New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where to map slack resources to my own org's resources when oauth completes? #1211
Comments
Hi @TroutZen, Thanks for reaching out and clearly explaining your use-case! At the moment, For now, I've labelled this as a If you have any initial thoughts, feel free to drop them here! |
Thanks @mwbrooks, I think passing in The only additional thing I might add is that we considered adding some of this logic to |
Hi @TroutZen, thanks for your prompt reply here!
If I understand your use case correctly, enhancing the If you are thinking to revoke the installation (by calling This is why our team discussed the necessity to introduce a new method like
Thanks for the input. We've been aware of this but changing this is a breaking change. In future major version upgrades, we may improve it. |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
Hello @TroutZen, did you find a solution to map your installation with you own org data? @seratch do you have something to suggest for this? Or should I use installer.generateInstallUrl({
scopes: ['channels:read'],
metadata: JSON.stringify({org_id:'1234'})
}) |
@RomainCscn Currently, the Due to other priorities, we didn't have the bandwidth to work on it but recently I started using my time for the OAuth package improvements including this task. It won't take long but we cannot tell when we can ship the new features yet. If you need an immediate solution, one workaround that I have to suggest is to go with your own implementation reusing some parts of the OAuth package such as the authorize URL generation. With this way, you can set any cookies to your end-user's browser session. That would be much easier way. I hope this helps. |
#1391 enables a new way to handle this use case. Since the next version, developers can utilize Checking "Persisting data during the OAuth flow" section in https://slack.dev/node-slack-sdk/oauth would be helpful to understand how to use those callback functions. Let me close this issue as the one that will be resolved in v3.11 release milestone. |
Thanks for your reply. Do you know when the |
@RomainCscn If everything goes well, we can ship it within a few business days! I've done with all the remaining pull requests for the release and am waiting for reviews by other maintainers. At least, we can release beta or RC version in the time frame. |
Description
Hi there. My team is building a new slack app with slack bolt. I was looking for guidance on a particular question. We are currently building out the oauth flow which redirects to our own application after the user accepts the application scopes so that we can authenticate the user in our platform before completing oauth with slack. After authenticating the user in our platform we complete the oauth flow which eventually triggers the
installationStore
'sstoreInstallation
method per example below:The problem that I am facing is that when I store the installation I also want to be able to link up the relationships between the slack user and the user I know in my own application (i.e. slack user id <> my orgs user id). However, there is nothing that I can pass into this callback from the request that would allow me to do that. What I would like to be able to do is read from the request so I can pull out org specific information that I can use when storing tokens. For example
storeInstallation: async (request, installation)
Would appreciate feedback from this request or perhaps a suggestion on how to best handle this problem.
Thanks!
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)The text was updated successfully, but these errors were encountered: