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

Synapse doesn't give clients a submit_url on requestToken breaking msisdn adding #6076

Closed
anoadragon453 opened this issue Sep 20, 2019 · 2 comments
Assignees
Labels
z-privacy-sprint (Deprecated Label)

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Sep 20, 2019

When a client tries to add a phone number to their account, they first need to call /requestToken on the homeserver. The user will get a code sent via SMS and give it to the client. At this point the client doesn't know where to submit this token because there is no spec'd /submitToken endpoint.

This is solved in MSC2078 by having a submit_url parameter returned on Client-Server /requestToken calls, so clients knew where to submit the token.

Up until this point, Synapse has ignored this as it's only needed for phone numbers and Synapse does not support handling phone numbers on its own. However, due to recent privacy work there is a case where a homeserver may be delegating phone number sending to one identity server, and the client may have configured to use another, or none at all!

The client is thus unsure where to submit the token to, and adding a phone number to the user's account fails.

Synapse needs to implement the submit_url response parameter in MSC2078 to fix this.

This will be done in two parts. First is adding a POST /add_threepid/email/submit_token endpoint to Synapse which will simply proxy to the threepid delegate if one is configured. The second is to return this URL when the client calls .../requestToken.

@richvdh
Copy link
Member

richvdh commented Sep 23, 2019

First is adding a POST /add_threepid/email/submit_token endpoint to Synapse which will simply proxy to the threepid delegate if one is configured

A note on why this is the right solution, for future reference: the fact that synapse is delegating to an IS for the MSISDN validation is an internal detail, so it's not really appropriate for synapse to return a submit_url that points directly to the IS. Indeed, that IS may even be on an internal URL.

richvdh pushed a commit that referenced this issue Sep 23, 2019
richvdh pushed a commit that referenced this issue Sep 23, 2019
Second part of solving #6076
Fixes #6076

We return a submit_url parameter on calls to POST */msisdn/requestToken so that clients know where to submit token information to.
@richvdh
Copy link
Member

richvdh commented Sep 23, 2019

fixed by #6078 and #6079

@richvdh richvdh closed this as completed Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-privacy-sprint (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants