Skip to content
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

[oauth] Add "installOptions" as argument to "storeInstallation" call? #1185

Closed
4 of 9 tasks
Bazze opened this issue Mar 9, 2021 · 2 comments · Fixed by #1187
Closed
4 of 9 tasks

[oauth] Add "installOptions" as argument to "storeInstallation" call? #1185

Bazze opened this issue Mar 9, 2021 · 2 comments · Fixed by #1187
Labels
enhancement M-T: A feature request for new functionality

Comments

@Bazze
Copy link

Bazze commented Mar 9, 2021

Description

I'm currently facing difficulties storing the token from the oauth process using the @slack/oauth "installationStore" functionality. The problem is that when saving the installation in our db (using storeInstallation) we want to properly relate this data to a specific customer account. We pass the customer account info in the "metadata" and it's available in the installOptions which is currently NOT being passed into the storeInstallation call. Why is that and would you consider a PR for changing this and also passing the installOptions?

(In the success callback it is supplied as an argument, so I'm thinking I'll try as a workaround to just set storeInstallation to a function that returns a resolved promise and then do my storing in the success callback instead.)

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.
@gitwave gitwave bot added the untriaged label Mar 9, 2021
@misscoded misscoded added question M-T: User needs support to use the project and removed untriaged labels Mar 9, 2021
@stevengill stevengill added enhancement M-T: A feature request for new functionality and removed question M-T: User needs support to use the project labels Mar 10, 2021
@stevengill
Copy link
Member

Hey @Bazze,

This is a very reasonable request. I agree we should add metadata to installation, or offer a different way to extend the installation object. I've marked this as a enhancement for now.

@seratch
Copy link
Member

seratch commented Mar 10, 2021

team_id, scopes, and user_scopes in InstallURLOptions are already in the installation data too. I don't think there are possible use cases where developers need to know redirect_uri when storing an installation.

For this reason, I think we can simply have metadata as an optional value in Installation interface data. Here is a pull request resolving this issue: #1187

stevengill added a commit that referenced this issue Mar 10, 2021
…tion

Fix #1185 Add state metadata to Installation interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants