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

Use nicer APIs for toggling a 3PID's shared status #2654

Closed
jryans opened this issue Aug 15, 2019 · 1 comment
Closed

Use nicer APIs for toggling a 3PID's shared status #2654

jryans opened this issue Aug 15, 2019 · 1 comment
Labels
A-Identity-Server feature privacy privacy-sprint T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@jryans
Copy link
Contributor

jryans commented Aug 15, 2019

At the moment, when toggling a 3PID's shared status, Riot will:

  1. Remove the 3PID from the HS with POST /_matrix/client/r0/account/3pid/delete
  2. Re-add the 3PID via the HS with POST /_matrix/client/r0/account/3pid/[email|msisdn]/requestToken and setting the bind flag to the new status
  3. Usual 3PID validation and adding flow

This is not great in general, as it's not atomic, so if you never act on the validation token, then you have actually entirely removed the 3PID from your account.

Instead we should change to the new APIs tracked in matrix-org/synapse#5827 and matrix-org/synapse#5862.

To change a 3PID from unshared to shared:

  1. Call POST /_matrix/client/r0/account/3pid/[email|msisdn]/requestToken and setting the bind flag to the new status
  2. Usual 3PID validation and adding flow

To change a 3PID from shared to unshared:

  1. Call POST /_matrix/client/r0/account/3pid/unbind
@jryans
Copy link
Contributor Author

jryans commented Sep 18, 2019

This concern here is resolved by fixing #2713.

@jryans jryans closed this as completed Sep 18, 2019
@jryans jryans added phase:1 and removed phase:2 labels Sep 18, 2019
@kittykat kittykat added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Identity-Server feature privacy privacy-sprint T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

2 participants