Development #21292
Afficher une page d'information indiquant que l'adresse de courriel est utilisée lors d'une création de compte automatique avec FC alors que l'adresse de courriel est déjà utilisée
100%
Description
(Suite à la discussion sur #20738)
Au retour d'un SSO FC, avec un compte FC inconnu (sub inconnu), sur un authentic avec email unique activé, et que l'adresse email servi par le user est déjà utilisée par un compte existant, et que ce compte est déjà lié à FC, cela produit l'erreur ci-dessous.
Il faut afficher une page à l'usager indiquant :
"L'adresse de courriel fournie par FranceConnect est déjà utilisée. Pour vous connecter vous devez vous créer un compte en utilisant une autre adresse de courriel. Vous pourrez ensuite lui associer votre compte FranceConnect à partir de la page de votre compte."
AttributeError at /fc/callback/ 'User' object has no attribute 'backend' Request Method: GET Request URL: https://moncompte-rec.grandlyon.com/fc/callback/?nonce=SNCEw90uNdUaxEbaqtOsnA7VlE-BO1a8oJJIuFvFUBY&service=rp-de-recette&next=%2Fidp%2Foidc%2Fauthorize%2F%3Fresponse_type%3Dcode%26scope%3Dopenid%2520email%2520profile%2520crown%26client_id%3Da078a98b-7242-4fb1-961b-a4d5c54afdba%26state%3D-K5rt2l21CUnU9bLMyzqI9pg0P0%26redirect_uri%3Dhttps%253A%252F%252Foidc2-grandlyon.dev.entrouvert.org%252Fprivate.php%252Fcb%26nonce%3DSNCEw90uNdUaxEbaqtOsnA7VlE-BO1a8oJJIuFvFUBY&code=4b02d9ff5ac9102b624ecd8833d87a0ea66978a3a86bdd5d80dd1bbfdc7f0f59&state=0a6e1dc5-6cb8-46b3-b886-a7547b5df0b9 Django Version: 1.8.18 Exception Type: AttributeError Exception Value: 'User' object has no attribute 'backend' Exception Location: /usr/lib/python2.7/dist-packages/django/contrib/auth/__init__.py in login, line 112 Python Executable: /usr/bin/python Python Version: 2.7.9 Python Path: ['/', '/usr/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/authentic2/vendor'] Server time: lun, 22 Jan 2018 09:04:35 +0100 Environment: Request Method: GET Request URL: https://moncompte-rec.grandlyon.com/fc/callback/?nonce=SNCEw90uNdUaxEbaqtOsnA7VlE-BO1a8oJJIuFvFUBY&service=rp-de-recette&next=%2Fidp%2Foidc%2Fauthorize%2F%3Fresponse_type%3Dcode%26scope%3Dopenid%2520email%2520profile%2520crown%26client_id%3Da078a98b-7242-4fb1-961b-a4d5c54afdba%26state%3D-K5rt2l21CUnU9bLMyzqI9pg0P0%26redirect_uri%3Dhttps%253A%252F%252Foidc2-grandlyon.dev.entrouvert.org%252Fprivate.php%252Fcb%26nonce%3DSNCEw90uNdUaxEbaqtOsnA7VlE-BO1a8oJJIuFvFUBY&code=4b02d9ff5ac9102b624ecd8833d87a0ea66978a3a86bdd5d80dd1bbfdc7f0f59&state=0a6e1dc5-6cb8-46b3-b886-a7547b5df0b9 Django Version: 1.8.18 Python Version: 2.7.9 Installed Applications: '' Installed Middleware: '' Traceback: File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view 71. return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2_auth_fc/views.py" in dispatch 296. **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch 89. return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2_auth_fc/views.py" in get 409. a2_utils.login(request, user, 'france-connect') File "/usr/lib/python2.7/dist-packages/authentic2/utils.py" in login 401. auth_login(request, user) File "/usr/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in login 112. request.session[BACKEND_SESSION_KEY] = user.backend Exception Type: AttributeError at /fc/callback/ Exception Value: 'User' object has no attribute 'backend'
Files
Related issues
Associated revisions
views: show warning to users with a mail linked to another FC account (fixes #21292)
The warning will help them connect their FC account to normally
registered account.
History
Updated by Mikaël Ates almost 6 years ago
- Related to Development #20738: FC ne supporte pas le mode mail unique à cause de l'IdP DGFIP added
Updated by Benjamin Dauvergne almost 6 years ago
- Related to Bug #20611: Lors d'une réconciliation basé sur le mail mais où la création d'une nouvelle liaison est impossible car une existe déjà, il faut logger l'utilisateur avec la méthode 'email' added
Updated by Benjamin Dauvergne almost 6 years ago
- File 0001-views-show-warning-to-users-with-a-mail-linked-to-an.patch 0001-views-show-warning-to-users-with-a-mail-linked-to-an.patch added
Relecture please.
Updated by Benjamin Dauvergne almost 6 years ago
- Status changed from Nouveau to En cours
- Assignee set to Benjamin Dauvergne
Updated by Benjamin Dauvergne almost 6 years ago
- Status changed from En cours to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit authentic2-auth-fc|0f877b75a96692c56c09bd785502c4ddde7da6b4.
Updated by Benjamin Dauvergne almost 6 years ago
- Status changed from Résolu (à déployer) to Fermé
views: show warning to users with a mail linked to another FC account (fixes #21292)
The warning will help them connect their FC account to normally
registered account.