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

Key as arg #52

Closed
jonthegeek opened this issue Mar 20, 2024 · 0 comments · Fixed by #53
Closed

Key as arg #52

jonthegeek opened this issue Mar 20, 2024 · 0 comments · Fixed by #53

Comments

@jonthegeek
Copy link
Member

Add slack_api_key to args of all functions that include slackcalls::post_slack() (and then use that, rather than the default).

.validate_cookie_token() currently uses Sys.setenv() to set the SLACK_API_TOKEN. That MUST, instead, just use the token in that single app.

Something server-side needs to make the cookie token available. In theory we can put it in session$userData without the user having to know about it. And then all of the shinyslack functions can look there by default for the key, something like this maybe?

session = shiny::getDefaultReactiveDomain(), api_key = session$userData$shinyslack_api_key
jonthegeek added a commit that referenced this issue Mar 21, 2024
jonthegeek added a commit that referenced this issue Mar 21, 2024
* Make env var inputs explicit.

https://design.tidyverse.org/inputs-explicit.html

* Use userData instead of env.

Closes #52.

* Update GHA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant