Skip to content

Conversation

@sandhose
Copy link
Member

@sandhose sandhose commented Mar 10, 2025

This changes things so that we don't return on the first error during validation, but rather accumulate them and show a proper errored form a the end.

This is mainly to fix #4170, as we weren't evaluating the policy if the homeserver told us the username isn't available.

This is how it looks like if you choose invalid chars in the username after this patch:

image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 10, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9668418
Status: ✅  Deploy successful!
Preview URL: https://b2e36739.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-upstream-oauth-bett.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose requested a review from reivilibre March 10, 2025 09:16
@sandhose sandhose added A-Upstream-OAuth Related to login via upstream OAuth 2.0 providers T-Enhancement New feature of request T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. and removed T-Enhancement New feature of request labels Mar 10, 2025
@sandhose sandhose changed the title Properly accumlate form errors on the upstream register page Properly accumulate form errors on the upstream register page Mar 10, 2025
Co-authored-by: reivilibre <[email protected]>
@sandhose sandhose enabled auto-merge March 11, 2025 07:02
@sandhose sandhose merged commit f1981ab into main Mar 11, 2025
21 checks passed
@sandhose sandhose deleted the quenting/upstream-oauth/better-form-errors branch March 11, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Upstream-OAuth Related to login via upstream OAuth 2.0 providers T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erroneous error when selecting a username

2 participants