Repository navigation
feat(standardized-auth): add an acme sample for standardized app auth - #324
Open
WilliamBergamin wants to merge 7 commits into
Open
WilliamBergamin wants to merge 7 commits into
WilliamBergamin wants to merge 7 commits into
Conversation
Connects user accounts with the Slack-owned Connect and Manage connection controls. Bolt's installation store 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 needs the next @slack/web-api, @slack/types, and @slack/oauth releases before CI can pass.
Match slack-samples/bolt-python-examples#305: run over Socket Mode, keep connections in a local JSON 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 store, tokens_revoked, and token revocation are gone. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
# Conflicts: # README.md
The listener reads subtype, trigger_id, and user straight from the event now that slackapi/node-slack-sdk#2783 types user_connection, so the local typedef and cast are gone. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
app.js only starts the app when import.meta.main is true, which needs Node.js 24.2 or newer. Older versions exit without connecting, so the engines field and README now say so. Biome skips the .slack directory, since the Slack CLI writes .slack/apps.json without formatting it and that failed npm run lint after slack run. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…es 3.3.0 These are the versions slackapi/node-slack-sdk#2764 will publish with requestAuth and the user_connection types. CI fails to install until they are on npm; refresh package-lock.json after the release. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…n tests Listeners are now registered inline, so their argument types come from Bolt and the JSDoc typedefs go away. The tests now drive the real app through app.processEvent, with a fake globalThis.fetch in place of nock. 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 lets users connect their account with Slack's built-in Connect and Manage connection controls. Rocket skates, anvils, and giant magnets not included.Before merging
Needs
@slack/web-api8.3.0and@slack/types3.3.0to be released. The sample's CI job fails until then.Testing
Use a workspace with standardized app authentication and Slack CLI v4.11.0 or newer.
slack runinstandardized-auth.🤖 Generated with Claude Code