-
-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilise token authenticated registration support #2181
Conversation
962976b
to
b84ecc4
Compare
Token authenticated registration was added to the Matrix specification in v1.2: https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration Signed-off-by: Callum Brown <callum@calcuode.com>
b84ecc4
to
672fd2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look at this! Do you have a link to when servers have implemented the stable version so we can evaluate the risk of this change landing?
I believe Synapse is the only server implementing this, and there is a release candidate (1.53.0rc1) which uses the stable version: Ruma has also made the change, but I don't think it's released yet: |
It looks a bit too early for us to drop backwards compatibility with the unstable version then. Our options are to continue supporting both types, or wait until 1.53 has received sufficient enough installs to be safe for us to transition (about 3 months). |
Ok. Also, Synapse 1.53.0.rc1 does not maintain backwards compatibility, so without support for the stable version the functionality will break for matrix-js-sdk users of updated servers. |
The server doesn't need to maintain backwards compatibility in this case, but we as a client won't know what version of the server we're talking to so need to handle the case where legacy servers offer the unstable flows. We've implicitly made the decision to support the unstable identifiers by implementing it, so need to maintain that until servers have upgraded enough where it's reasonable for us to remove the backwards compatibility ourselves. Usually we avoid this problem entirely by not using enums (because they can't support stable and unstable at the same time), but given we don't really have a choice we end up with |
Ok, thanks |
Servers are not yet widely updated with support for the stable version of the registration token UIA type. Clients should check if the authentication type is either `RegistrationToken` or `UnstableRegistrationToken`. Signed-off-by: Callum Brown <callum@calcuode.com>
How does that look? |
@turt2live Hi, any chance you could have a look at this this week? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Add MatrixClient.doesServerSupportLogoutDevices() for MSC2457 ([\matrix-org#2297](matrix-org#2297)). * Live location sharing - expose room liveBeaconIds ([\matrix-org#2296](matrix-org#2296)). * Support for MSC2457 logout_devices param for setPassword() ([\matrix-org#2285](matrix-org#2285)). * Stabilise token authenticated registration support ([\matrix-org#2181](matrix-org#2181)). Contributed by @govynnus. * Live location sharing - Aggregate beacon locations on beacons ([\matrix-org#2268](matrix-org#2268)). * Prevent duplicated re-emitter setups in event-mapper ([\matrix-org#2293](matrix-org#2293)). * Make self membership less prone to races ([\matrix-org#2277](matrix-org#2277)). Fixes element-hq/element-web#21661.
Token authenticated registration was added to the Matrix specification in v1.2:
https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration
Signed-off-by: Callum Brown callum@calcuode.com
Here's what your changelog entry will look like:
✨ Features