Users with duplicate emails being allowed

Created on 30 September 2022, about 2 years ago
Updated 19 September 2024, 3 months ago

Problem/Motivation

I think this is an edge case, but it is proving some what problematic.

I'm seeing users with the same email address (duplicate email addresses in the user table) being generated sporadically.

This code in social_auth (same in v3) is not using \Drupal\user\Entity\User::create – I'm wondering if perhaps the constraints aren’t being enforced using this technique? Or perhaps something like \Drupal::lock() needs to be added into the equation for social_auth? Lock may not add much for us, but see similar, but different lock use case for potential considerations.

Steps to reproduce

Use a social auth provider (in my case google) and repeatedly click "login with ..." to start the oauth exchange.
In some cases, different users with the same email address are created (i've seen up to three)

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

πŸ› Bug report
Status

Needs work

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States matt_paz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024