Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jul 20, 2016

Conversation

Projects
None yet
2 participants
Member

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.

Register a device_id in the /v2/register flow.
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

8 of 10 checks passed

Sytest Dendron (Commit) Build #300 origin/rav/register_device_on_register failed in 1 min 28 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Flake8 + Packaging (Commit) Build #1186 origin/rav/register_device_on_register succeeded in 37 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #1137 origin/rav/register_device_on_register succeeded in 5 min 47 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #1159 origin/rav/register_device_on_register succeeded in 4 min 48 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #1225 origin/rav/register_device_on_register succeeded in 2 min 5 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@richvdh richvdh deleted the rav/register_device_on_register branch Jul 20, 2016

@dbkr dbkr commented on the diff Jul 20, 2016

synapse/rest/client/v2_alpha/register.py
@@ -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
@dbkr

dbkr Jul 20, 2016

Member

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.

@richvdh

richvdh Jul 20, 2016

Member

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 join this conversation on GitHub. Already have an account? Sign in to comment