Repository navigation
M1-E: single sign-on (m.login.sso) on desktop and web - #14
Open
hsmith-dev wants to merge 1 commit into
Open
hsmith-dev wants to merge 1 commit into
hsmith-dev wants to merge 1 commit into
Conversation
- chatcraft-matrix `sso`: the homeserver's SSO URL (refuses when it isn't offered), a one-off loopback listener on 127.0.0.1 for the desktop, and token parsing that rejects anything odd. `MatrixConfig::login_token` exchanges the token with m.login.token. If the identity provider signed in someone other than the username entered, the device is signed out and its store deleted. - Shell: "Sign in with single sign-on" button and a "continue in your browser" card with cancel. Tokens are never remembered and are dropped after a failure. - Desktop: opens the system browser (egui-winit `links`, which also makes message links open). Web: the page redirects to the SSO page and takes `?loginToken=` back only for a sign-on this tab started, then strips the token from the address bar. - Cross-signing bootstrap after SSO skips the password step and says why. - Tests: token parsing, the loopback listener, username matching, Shell flows (token, failure, cancel), and tests/sso.rs against Synapse with a CAS provider (sign-in, resume, single use, mismatch cleanup). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Stacked on #13.
Adds sign-in through the homeserver's identity provider (Google, GitHub, company OIDC/SAML, CAS, or a Matrix Authentication Service via its
m.login.ssocompatibility layer).127.0.0.1at a random port and opens the SSO page in the system browser. The login token comes back to that listener, which gives up after five minutes or when you cancel.?loginToken=only for a sign-on this tab started (the pending account waits insessionStorage) and removes the token from the address bar.linksfeature. Message links now open in the browser too; before this,open_urldid nothing on the desktop.docs/matrix.md› Single sign-on and Testing (stub CAS setup), plus gaps and ROADMAP.Not yet supported: OIDC-native-only homeservers (MSC3861 without
m.login.sso), and browser confirmation (UIA fallback) for cross-signing when the server requires it after SSO.Testing
cargo xtask ci: all 7 steps pass.cargo test -p chatcraft-matrixagainst Synapse with a stub CAS provider: 20 unit tests and 12 integration tests pass. The newtests/sso.rsusescurl -Las the browser and covers sign-in, resume, single use, and refusal of a mismatched user with cleanup.🤖 Generated with Claude Code