mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-13 06:58:37 +00:00
`/register?token=…` now resolves the invite code server-side and hands what it was issued for to the form island through a `data-invite` attribute: a pinned email address is shown as the line announcing where the verification code goes rather than as an input, a pinned username isn't shown at all, and a `passwordless` code replaces the password fields with a notice and relabels the submit button. A code the server refused only reports that, as an error above the form. Because a passwordless code is a way to register on its own, the shortcuts which send the page to the upstream provider or to `/login` when password registration is disabled are skipped when the link carries one. The code itself travels back on submission through a hidden field, so a form which comes back with errors keeps its shape, and so does the redirect the page sends the user to when the CSRF token has expired.