Skip to content

Perform UIA correctly when registering users on a deployment#896

Open
timedoutuk wants to merge 5 commits into
matrix-org:mainfrom
timedoutuk:timedoutuk/fix-oneshot-uia-registration
Open

Perform UIA correctly when registering users on a deployment#896
timedoutuk wants to merge 5 commits into
matrix-org:mainfrom
timedoutuk:timedoutuk/fix-oneshot-uia-registration

Conversation

@timedoutuk

@timedoutuk timedoutuk commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #893 by:

  • Correctly initiating and completing a UIA session when calling CSApi.RegisterUser
  • Using a helper function to initiate UIA and then complete it during TestRegistration
  • Adding a test to TestRegistration that ensures homeservers enforce the requirement for the session auth field, but only when a session is given at all

This PR does not fix the fact that Complement assumes the target homeserver returns at least one flow whose only stage is m.login.dummy, but this is seen as a non-issue given there isn't really a reasonable way to dynamically pass the challenge.

Pull Request Checklist

Fixes matrix-org#893

Signed-off-by: timedout <git@nexy7574.co.uk>
@timedoutuk timedoutuk requested review from a team as code owners July 15, 2026 00:01
@timedoutuk

Copy link
Copy Markdown
Contributor Author

Turns out a lot of Dendrite's tests also depend on being able to do oneshot uia (looking at the registration tests at least), going to mark this as WIP until I can fix all of that too

@timedoutuk timedoutuk marked this pull request as draft July 15, 2026 00:09
Signed-off-by: timedout <git@nexy7574.co.uk>
Signed-off-by: timedout <git@nexy7574.co.uk>
…ring registration

Signed-off-by: timedout <git@nexy7574.co.uk>
Also fixes the maps.Clone param order being inverted

Signed-off-by: timedout <git@nexy7574.co.uk>
@timedoutuk timedoutuk marked this pull request as ready for review July 15, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standard user registration attempts to oneshot UIA

1 participant