-
Notifications
You must be signed in to change notification settings - Fork 41
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
Handle users changing their email address in FxA to an email address we already have #1780
Comments
This happened for real here (sqs update, then login): |
Note though this is most likely to happen with old |
This issue originated from an inquiry we got on amo-admins. Would a reasonable work-around for that affected user be to clear the |
The safe solution is deleting one of the AMO accounts (hard delete). |
Our solutions come down to: Far off in the future alternatives: |
I think C is the better approach. On both A and B there seems to be a possibility of data being lost or hard to track. Users can forget they had old accounts and may want to keep them after finding out. |
Linking this sentry issue - https://sentry.prod.mozaws.net/operations/olympia-prod/issues/4447706/ here, this looks very related. |
Okay, we'll go with C then for the user login. As for FxA updates and the tracebacks that occur like the above: Minimally, we could just handle them better and ignore the update (though that leaves one of the user accounts with the wrong email address). I guess we could email the user to let them know about the clash? Not sure how often we'd be doing that (sentry tracebacks don't seem that frequent_) and if the user confusion is worth the benefit. |
Since admins can't know what correct account to use, we clear the " We have un-linked both AMO accounts from Firefox Account, so next time you try and log in to AMO, you should be logged in with the AMO account that belongs to your current primary email address on Firefox Accounts. If you need to access your other AMO account, you need to remove that secondary email from your Firefox Account and create a new, separate Firefox Account using that email address as a primary email adress. Unfortunately, AMO does not support account merging yet. Why can't AMO clear the |
Okay, but that's not really talking them through the options (c) - it's (a) with an explanation. Their If we want to do (a) then that's one thing, and this issue becomes how to message that to the user (I'm pretty certain that would need to an addon-server thing because that's where the code is ... but it should be in addons-fronted for UX consistency). |
Admins cannot know which AMO account should be made the one the user logs in with. This requires back and forth with the affected user. And I doubt they can make an informed choice without knowing what information is attached to which account, and I am not comfortable with sharing that over email to an identity I can't verify. Even if they were able to make that decision eventually, this requires significant effort on both sides. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
That would only work for #1856, and only if we also changing the unique constraint so that it covers both the deleted and email field - because for a successful login, we also try to update the user fxa_id and email if what we have in the database differs from what FxA sent. (In any case we need to be careful about not accidentally allowing a banned user to create a new account with the same email) |
What are other use cases we need to consider? |
The original use case in this issue doesn't have a deleted account at all |
Can this still happen (excluding ancient accounts), given that we listen to email change events? |
It shouldn't but it's not 100% guaranteed we receive a notification and don't fail during processing it. Though those are edge cases (along with prehistoric accounts) so we probably don't need to consider them (i.e. just let them fail like now) |
Since this is all async and we don't have a guarantee we'll receive and process a particular event before another, yes. (plus, as you allude to, there are old accounts, accounts for which a task failed, etc) |
I'm stuck in this situation. Before Firefox Accounts existed (and probably before Pocket was acquired by Mozilla) I created three accounts:
(I don't think I've signed into Firefox Sync yet on any Firefox browsers.) My Pocket account got upgraded into a Firefox Account for email A. I accidentally signed in to AMO with that Firefox Account, before remembering that I used to use a different email address with AMO. So then I wanted to merge the Firefox Account with my old AMO account from email B. So I followed these instructions and tried the following:
Expected result: I was hoping this would associate my old email B AMO account with my Firefox Account, so I would have both the Pocket and AMO data on a single account. (Then I planned to change my Firefox Account email back from email B to email A, in order to access both Pocket and AMO using email A). Actual result: Internal Server Error on https://addons.mozilla.org/api/auth/authenticate-callback/ It sounds like in this case excluding deleted and not banned accounts as suggested by wagnerand would have avoided this error? |
The problem with that approach is that if the second account also gets deleted, we can't keep the |
Scenario:
user_a.email = 'foo@baa', user_a.fxa_id=1234
user_b.email = 'yo@lo', user_b.fxa_id=None
user_a
changes their email address in FxA to'yo@lo'
. FxA allows this because it doesn't know about AMOs users and'yo@lo'
isn't registered to another FxA account.AMO gets a notification almost straight away via SQS and a task runs to update the user with
fxa_id=1234
(user_a
) to their new email address. This fails becauseemail
is a unique field - it's already used byuser_b
user_a
tries to log into AMO with their auth'd FxA account. This fails because we doUserProfile.objects.get(Q(fxa_id=identity['uid']) | Q(email=identity['email']))
[src] - i.e. we match on eitherfxa_id
oremail
anduid=1234
whileemail='yo@lo'
user_a
anduser_b
.┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: