From 7b7ab2df677ab3d798917a1120665834454413af Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 7 Jul 2022 13:05:56 +0200 Subject: [PATCH 2/2] auth_oidc: get a lock on the sub during authentication (#65412) --- src/authentic2_auth_oidc/backends.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/authentic2_auth_oidc/backends.py b/src/authentic2_auth_oidc/backends.py index c96680b9..cf8aab8a 100644 --- a/src/authentic2_auth_oidc/backends.py +++ b/src/authentic2_auth_oidc/backends.py @@ -230,6 +230,8 @@ class OIDCBackend(ModelBackend): if attribute == 'email': email = value + Lock.lock_identifier(identifier=id_token.sub) + User = get_user_model() user = None if provider.strategy == models.OIDCProvider.STRATEGY_FIND_UUID: -- 2.35.1