slackapi / slackapi/bolt-python
Please add `app.get_new_client()` to help with token rotation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 288
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
From a discussion in #1324, the only safe way to call the client from outside a bolt handler when token rotation is on is to create a new client each time (as the handlers do)
Since Bolt is currently handling all of this for us, it'd be very useful to have a method along the lines of
client = await bolt.get_new_client(team_id)
that means callers do not need to deal with the InstallationStore and such themselves.
Category (place an x in each of the [ ])
- slack_bolt.App and/or its core components
- slack_bolt.async_app.AsyncApp and/or its core components
- Adapters in slack_bolt.adapter
- Others
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review discussion #1324 first, then inspect the slack_bolt.App and slack_bolt.async_app.AsyncApp entry points and how they use InstallationStore during token rotation. Done means callers can obtain a newly created client for a team through the requested methods without handling the store themselves, for both synchronous and asynchronous apps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100