-
Notifications
You must be signed in to change notification settings - Fork 210
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
Comments
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. |
Taking this out of the milestone, but leaving it alive because I want to dig into the refactoring here a little. |
Marking this |
Got another report of a user hitting this via Matrix today. |
There's also a question in SUMO about this recently. |
➤ Wil Clouser commented: FXA-685, verifier upgrades, would fix this |
@vbudhram mentioned this to me a little while ago, but I only just got around to stepping through it and filing a bug. STR:
Expected results:
Actual results:
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 theUNIQUE
constraint on thenormalizedEmail
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
The text was updated successfully, but these errors were encountered: