slackapi / slackapi/bolt-python

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

Offen
#1,332 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

auto-triage-skip discussion
Vorherrschende Sprache
Python
Sterne
1.3k
Forks
288
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
10

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Prüfe zuerst die Diskussion #1324 und untersuche anschließend die Einstiegspunkte slack_bolt.App und slack_bolt.async_app.AsyncApp sowie deren Verwendung von InstallationStore während der Token-Rotation. Als abgeschlossen gilt die Aufgabe, wenn Aufrufer über die angeforderten Methoden einen neu erstellten Client für ein Team erhalten können, ohne den Store selbst verwalten zu müssen, und zwar sowohl für synchrone als auch für asynchrone Apps.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api, authentication
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.