Page MenuHomePhabricator

Prevent duplicate account links from being created by swapping logins and then refreshing the link
ClosedPublic

Authored by epriestley on Oct 23 2015, 8:03 PM.

Details

Summary

Fixes T6707. Users can currently do this:

  • Log in to a service (like Facebook or Google) with account "A".
  • Link their Phabricator account to that account.
  • Log out of Facebook, log back in with account "B".
  • Refresh the account link from SettingsExternal Accounts.

When they do this, we write a second account link (between their Phabricator account and account "B"). However, the rest of the codebase assumes accounts are singly-linked, so this breaks down elsewhere.

For now, decline to link the second account. We'll permit this some day, but need to do more work to allow it, and the need is very rare.

Test Plan
  • Followed the steps above, hit the new error.
  • Logged back in to the proper account and did a link refresh (which worked).

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 34569.Oct 23 2015, 8:03 PM
epriestley retitled this revision from to Prevent duplicate account links from being created by swapping logins and then refreshing the link.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad accepted this revision.Oct 23 2015, 8:37 PM
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 23 2015, 8:37 PM
This revision was automatically updated to reflect the committed changes.