{{ message }}
Repository navigation
feat(standardized-auth): add an acme sample for standardized app auth - #95
Draft
WilliamBergamin wants to merge 3 commits into
Draft
WilliamBergamin wants to merge 3 commits into
WilliamBergamin wants to merge 3 commits into
Conversation
Connects user accounts with the Slack-owned Connect and Manage connection controls. Bolt's installation service holds each connection: the OAuth success hook reports it with apps.user.connection.requestAuth, the disconnect action forgets and revokes the user token, tokens_revoked forgets users who remove the app, and the user_connection_status_requested event is answered with apps.user.connection.update. App Home renders the auth_provider block. The user_connection request listener is written and tested but not yet registered, since no Bolt routes that payload to action listeners yet. This depends on java-slack-sdk 1.52.1-SNAPSHOT (AuthProviderBlock, the new methods, and the status-requested event model) until it is released.
Match slack-samples/bolt-python-examples#305: run over Socket Mode, keep connections in a local properties file, handle the user_connection event and the fixed auth_provider_connect and auth_provider_disconnect action IDs, and answer user_connection_status_requested. The OAuth flow, installation service, tokens_revoked, and token revocation are gone. The SDK has no user_connection event model yet, so the sample defines UserConnectionEvent with a null default subtype to match Bolt's routing key. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Assert Bolt keys UserConnectionEvent as user_connection, and restore the connections path before deleting the temp directory. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This pull request adds a
standardized-authsample: Acme, an app that connects user accounts with the Slack-owned Connect and Manage connection controls. Rocket skates, anvils, and giant magnets not included.user_connectionevent. The app answers within 3 seconds withapps.user.connection.requestAuthand the event'strigger_id, which opens the connection modal.auth_providerbuttons use the fixedauth_provider_connectandauth_provider_disconnectaction IDs. Both report the new state withrequestAuth, which redraws an open modal, and refresh App Home.user_connection_status_requestedis answered withapps.user.connection.update.auth_providerblock.user_connectionanduser_connection_status_requested, which every app withfeatures.user_connectionsneeds.auth_urlwith a signedstate.UserConnectionEvent, since the SDK has no model foruser_connectionyet.1.52.1-SNAPSHOTuntil java-slack-sdk releasesappsUserConnectionRequestAuth,AuthProviderBlock, andUserConnectionStatusRequestedEvent(feat: add the user_connection_status_requested event model slackapi/java-slack-sdk#1660); CI fails until then.Testing
In a workspace where standardized app authentication is available, with a Slack CLI newer than v4.10.0:
slack runinstandardized-auth.🤖 Generated with Claude Code