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

Access state param in Add-to-Slack response #94

Closed
aok-solutions opened this issue Mar 6, 2019 · 2 comments
Closed

Access state param in Add-to-Slack response #94

aok-solutions opened this issue Mar 6, 2019 · 2 comments

Comments

@aok-solutions
Copy link
Collaborator

When using the Add to Slack button, there is an optional state parameter that allows you to send additional information that will be returned upon completion of the request (Slack recommends using it to avoid forgery attacks).

Is there a way to access this parameter? I will try opening a pull request to see if I can expose it in the creating callback so that users can take action based on it's value.

@dblock
Copy link
Collaborator

dblock commented Mar 7, 2019

I believe this shows up as a query parameter, so https://github.com/slack-ruby/slack-ruby-bot-server/blob/master/public/scripts/register.js#L34 and https://github.com/slack-ruby/slack-ruby-bot-server/blob/master/lib/slack-ruby-bot-server/api/endpoints/teams_endpoint.rb#L35 could (should) be modified to include it along with code. Maybe you can test that and contribute?

@dblock
Copy link
Collaborator

dblock commented Mar 13, 2019

Closed via #95.

@dblock dblock closed this as completed Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants