Skip to content

Handle users changing their email address in FxA to an email address we already have #1780

@eviljeff

Description

@eviljeff

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 because email is a unique field - it's already used by user_b

  • but it's only logged in sentry as an error and can't be fed back to the user via FxA.

user_a tries to log into AMO with their auth'd FxA account. This fails because we do UserProfile.objects.get(Q(fxa_id=identity['uid']) | Q(email=identity['email'])) [src] - i.e. we match on either fxa_id or email and uid=1234 while email='yo@lo'

  • matching both user_a and user_b.

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

neverstaleUse this to tell stalebot to not touch this issue. Should be used infrequently.qa:verified_fixrepository:addons-serverIssue relating to addons-server

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions