feat(api): /chat and /chat/<channel> sign into Slack via SSO - #185
Merged
Merged
Conversation
Match laddr: the redirect targets Slack's SP-initiated SSO start URL with redir=/messages/<channel>/, so the member is signed in through our IdP and lands in the channel. Years of codeforphilly.org/chat/<channel> links depend on the path form; default channel is general. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFyA5poHwrhAktrnsKrUiQ
The rewrite's /chat pointed at https://<team>.slack.com/channels/<name>, which assumes an existing Slack session, and /chat/<channel> fell through to the SPA's 404. laddr's Emergence\Slack\Connector redirected to Slack's SSO start with redir=/messages/<channel>/; Slack then drives the SP-initiated flow against our IdP and opens the channel. Restore that, accept the path form (with and without a trailing slash), and default to general. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFyA5poHwrhAktrnsKrUiQ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFyA5poHwrhAktrnsKrUiQ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFyA5poHwrhAktrnsKrUiQ
Merged
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.
Restores the laddr behaviour behind the
codeforphilly.org/chat/<channel>links distributed over the years. Plan:plans/chat-sso-launch.md.What was wrong
/chatredirected tohttps://codeforphilly.slack.com/channels/<name>— fine if you already have a Slack session, useless otherwise./chat/<channel>(the shape of the links in the wild) fell through to the SPA's 404.What laddr did
Emergence\Slack\Connector::handleLaunchRequest:i.e. SP-initiated SSO: Slack sends the AuthnRequest to our IdP (
/api/saml/slack/sso, verified live tonight), the member signs in here if needed, and Slack honoursredirto open the channel.Changes
specs/screens/chat.md: path form, SSO-start target, defaultgeneral.apps/api/src/routes/chat.ts:/chat,/chat/:channel,/chat/:channel/(the app does not ignore trailing slashes globally),?channel=kept for the project button; invalid/empty →general; host is alwaysSLACK_TEAM_HOST.Validation
type-check,lint, chat suite 14/14. Live check after deploy: signed-out browser →/chat/general→ CfP login → Slack opens in #general.🤖 Generated with Claude Code
https://claude.ai/code/session_01LFyA5poHwrhAktrnsKrUiQ