Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Register a device_id in the /v2/register flow. #937

Merged
merged 1 commit into from Jul 20, 2016

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Jul 20, 2016

This doesn't cover all of the registration flows, but it does cover the most
common ones: in particular: shared_secret registration, appservice
registration, and normal user/pass registration.

Pull device_id from the registration parameters. Register the device in the
devices table. Associate the device with the returned access and refresh
tokens. Profit.

This doesn't cover *all* of the registration flows, but it does cover the most
common ones: in particular: shared_secret registration, appservice
registration, and normal user/pass registration.

Pull device_id from the registration parameters. Register the device in the
devices table. Associate the device with the returned access and refresh
tokens. Profit.
@dbkr dbkr merged commit 742056b into develop Jul 20, 2016
@richvdh richvdh deleted the rav/register_device_on_register branch July 20, 2016 16:39
@@ -236,7 +237,7 @@ def on_POST(self, request):
add_email = True

result = yield self._create_registration_details(
registered_user_id
registered_user_id, body
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, this isn't going to work in the case where a user's account is registered after they come back from verifying their email address, where the parameters to registration will come out of check_auth )params, not the body of the current request.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, yes. I think the way I've implemented this in the js-sdk (matrix-org/matrix-js-sdk#151) means it will actually send a device_id in the follow-up request, but ISWYM.

I think I want to add some sytests to this though, so that I know what I'm doing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants