-
Notifications
You must be signed in to change notification settings - Fork 380
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
MSC4178: Additional Error Codes for requestToken endpoint #4178
Conversation
Team member @dbkr has proposed to merge this. The next step is review by the rest of the tagged people: Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for information about what commands tagged team members can give me. |
Co-authored-by: Andrew Morgan <[email protected]>
Firstly, Add the `M_THREEPID_MEDIUM_NOT_SUPPORTED` code to be returned by both | ||
[`POST /account/3pid/email/requestToken`](https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3account3pidemailrequesttoken) | ||
and | ||
[`POST /account/3pid/msisdn/requestToken`](https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3account3pidmsisdnrequesttoken), | ||
defined to mean that the homeserver does not support adding a third party identifier of that medium. |
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.
slightly wondering if we should extend this to POST /account/3pid/<unknown_medium>/requestToken
, but perhaps that's a job for another day.
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.
Yeah, the whole 3pid management spec could be generalised to arbitrary media, arguably. Might make more sense to do if we ever add another medium.
Firstly, Add the `M_THREEPID_MEDIUM_NOT_SUPPORTED` code to be returned by both | ||
[`POST /account/3pid/email/requestToken`](https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3account3pidemailrequesttoken) | ||
and | ||
[`POST /account/3pid/msisdn/requestToken`](https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3account3pidmsisdnrequesttoken), | ||
defined to mean that the homeserver does not support adding a third party identifier of that medium. | ||
|
||
Secondly, allow these endpoints to also return `M_INVALID_PARAM`, to indicate that the third party address | ||
was not valid for that medium (eg. not a valid phone number). | ||
|
||
For both of these codes, HTTP status code 400 should be used. |
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.
Have you considered extending this to the identity server endpoints? /_matrix/identity/v2/validate/email/requestToken
etc?
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.
I hadn't really, although only because the need is more obvious for homeservers which commonly may or may not support verifying certain types of identifier. Happy to add this for ID servers too if we'd rather keep symmetry and do it all in one go.
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.
Given FCP has now started, it's probably best to leave this for a future MSC.
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
Spec PR: matrix-org/matrix-spec#1944 |
Rendered
FCP tickyboxes
Impls
Element web: matrix-org/matrix-react-sdk#12896
Synapse: element-hq/synapse#17578