Skip to content
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

Relay M_TOKEN_INCORRECT as per MSC4183 #17625

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Aug 29, 2024

Relay error codes from the IS's submitToken endpoint

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

dbkr added 3 commits August 29, 2024 13:00
Relay error codes from the IS's submitToken endpoint
@richvdh
Copy link
Member

richvdh commented Feb 19, 2025

Copying some context from matrix-org/matrix-spec-proposals#4183 (comment) as to why this implements MSC4183:

  • Synapse does not return a submit_url from any of the POST /_matrix/client/v3*/email/requestToken endpoints, so MSC4183 does not apply there.

  • Synapse does not support POST /_matrix/client/v3/account/3pid/msisdn/requestToken (removed in Kill off half-implemented password-reset via sms matrix-org/synapse#6101)

  • Both POST /_matrix/client/v3/register/msisdn/requestToken and POST /_matrix/client/v3/account/3pid/msisdn/requestToken use IdentityHandler.requestMsisdnToken.

    requestMsisdnToken sets submit_url to /_matrix/client/unstable/add_threepid/msisdn/submit_token (yes, the register endpoint uses the add_threepid callback).

    And /_matrix/client/unstable/add_threepid/msisdn/submit_token is updated by this PR.

@richvdh
Copy link
Member

richvdh commented Feb 19, 2025

Note also: Synapse does implement POST /_synapse/client/password_reset/email/submit_token; however, that is used as a second stage after the GET endpoint (which shows an HTML page which posts back to itself). It is not used as a submit_url from POST /_matrix/client/v3/account/password/email/requestToken.

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

Successfully merging this pull request may close these issues.

2 participants