-
Notifications
You must be signed in to change notification settings - Fork 656
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
Best way to access app-specific data in installationStore
methods?
#1460
Comments
Hi @jkillian, thanks for asking the great question!
We didn't remove the metadata approach to avoid bringing any breaking changes to existing apps. Also, metadata can be useable for the purpose. However, I would suggest using the pair of
As I explained above, we suggest the new way (beforeRedirection and beforeInstallation). That being said, if you have existing apps that rely on metadata, you don't need to migrate those to the new way. We will continue supporting both approaches. Do these make sense to you? I hope this was helpful to you! |
Thank you for the detailed response!
The issue I'm running in to is that in Does that make sense? I don't see how |
@jkillian
If you develop your app in TypeScript, the type safety for the additional properties is room for improvement on the SDK side. |
👋 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. |
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number. |
I've been reading the docs on custom data in the oauth flow and also found slackapi/bolt-js#1211 but had a couple remaining questions on associating the oauth data from Slack with application-specific data.
What is the proper way to access app-specific data when using a custom
installationStore
as documented in "Storing installations in a database"? For example, in thestoreInstallation
callback, such information might be necessary in order to be able to write a slack token to the correct row in associated with some user in a DB.Also a bit confused on if
metadata
is still supposed to be used ever or not - it wasn't clear to me if the newbeforeInstallation
andbeforeRedirection
were suppose to supplant any use cases formetadata
or not.Apologies if I'm missing something obvious! Just wanted to be extra careful given that small mistakes in auth flows can have big consequences.
Packages:
Select all that apply:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
Reproducible in:
The Slack SDK version
"@slack/oauth": "2.5.1"
The text was updated successfully, but these errors were encountered: