slackapi / slackapi/bolt-python

Please add `app.get_new_client()` to help with token rotation

Open
#1,332 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triage-skip discussion
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.