Users with duplicate emails being allowed

Created on 30 September 2022, over 1 year ago
Updated 28 March 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

RTBC

Version

4.0

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.69.0 2024