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

Changing primary email does not "free up" the original email address #518

Closed
rfk opened this issue Sep 8, 2017 · 8 comments
Closed

Changing primary email does not "free up" the original email address #518

rfk opened this issue Sep 8, 2017 · 8 comments
Labels
fxa-auth-server Orphaned Temporary label for transitioning to jira cloud

Comments

@rfk
Copy link
Contributor

rfk commented Sep 8, 2017

@vbudhram mentioned this to me a little while ago, but I only just got around to stepping through it and filing a bug. STR:

  • Create an account with address A
  • Add a secondary email address B
  • Switch B to be your primary address
  • Remove A from the account

Expected results:

  • I can now sign up for a new, separate account with address A

Actual results:

  • The original account is still holding on to A and nobody else can use it. If they try, they'll get a pretty confusing error message:

capture

What I can do is add it as a secondary email onto another account, then make it the primary from there. But I can't directly create a new account with the original email as primary.


The reason for all this, is that we have to keep the original email address hanging around in the accounts table, because it's used as an input to the password-hashing function. When I try to create a new account with that email address, it violates the UNIQUE constraint on the normalizedEmail column here:

https://github.com/mozilla/fxa-auth-db-mysql/blob/master/lib/db/schema/patch-001-002.sql#L5

But...IIUC we no longer really use that column for ensuring uniqueness, because all emails are now written into the emails table and uniqueness is preserved there. So I wonder, can we just drop the unique constraint on this column (or perhaps even drop the column entirely) and resolve this issue?

┆Issue is synchronized with this Jira Task
┆Issue Number: FXA-689

@vbudhram
Copy link
Contributor

This has been hanging out in next for a while. I don't think I will have a chance to pick this up in current train. Moving to backlog with a ❤️ because I would like to get it resolved at some point.

@rfk
Copy link
Contributor Author

rfk commented Feb 16, 2018

Taking this out of the milestone, but leaving it alive because I want to dig into the refactoring here a little.

@rfk rfk self-assigned this Feb 16, 2018
@dannycoates dannycoates transferred this issue from mozilla/fxa-auth-server Apr 3, 2019
@rfk rfk removed their assignment May 9, 2019
@clouserw clouserw added the needs:product Any product questions including missing content or copy label Jun 20, 2019
@clouserw
Copy link
Member

Marking this needs:product (/cc @davismtl ). Is this something you want? There seems like security implications to allowing once-registered account to be created again, especially with sub platform now

@shane-tomlinson
Copy link
Contributor

Ref #502, #1437

@rfk
Copy link
Contributor Author

rfk commented Jul 14, 2020

@rfk
Copy link
Contributor Author

rfk commented Oct 27, 2020

Got another report of a user hitting this via Matrix today.

@kelimuttu
Copy link

There's also a question in SUMO about this recently.

@data-sync-user data-sync-user removed the needs:product Any product questions including missing content or copy label May 21, 2021
@data-sync-user
Copy link
Collaborator

➤ Wil Clouser commented:

FXA-685, verifier upgrades, would fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fxa-auth-server Orphaned Temporary label for transitioning to jira cloud
Projects
None yet
Development

No branches or pull requests

7 participants