Skip to content

Conversation

@calummackervoy
Copy link
Contributor

🤔 Pourquoi ?

Dans le cadre de la refonte de parcours d'inscription, quand les utilisateurs se connecte avec un nouveau compte qui partage un email avec un autre compte, on affiche un erreur. Dans ce PR on affiche un erreur standardisé, qui permet l'utilisateur à se connecter au compte existant (via une page dédiée) ou de s'inscrire avec un email différent depuis la page signup.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

🏝️ Comment tester

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

Example :

Screenshot 2024-10-02 at 11 30 50

En cliquant sur « se connecter avec ce compte » :

Screenshot 2024-10-02 at 11 31 24

En cliquant sur « retour » :

Screenshot 2024-10-02 at 11 38 41

@calummackervoy calummackervoy added the ajouté Ajouté dans le changelog. label Oct 2, 2024
@calummackervoy calummackervoy requested a review from tonial October 2, 2024 14:42
@calummackervoy calummackervoy self-assigned this Oct 2, 2024
@notion-workspace
Copy link

Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !

J'ai fait quelques remarques mais dans l'ensemble c'est super !

@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch 2 times, most recently from ef7b850 to da8b4b3 Compare October 3, 2024 13:51
@calummackervoy calummackervoy requested a review from tonial October 3, 2024 13:53
@calummackervoy calummackervoy added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Oct 3, 2024
@github-actions
Copy link

github-actions bot commented Oct 3, 2024

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch from da8b4b3 to 9a598c7 Compare October 10, 2024 17:24
@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch 3 times, most recently from 697b899 to b07996f Compare October 14, 2024 14:15
@calummackervoy
Copy link
Contributor Author

@tonial j'ai ajouté un bouton de retour sur la page pour le cas de rédirection (demande d'une relecture UX) dans le dernier commit. Si tout a l'air bon pour toi je les squasherai et merger

@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch from b07996f to 0df7f9a Compare October 21, 2024 11:49
allows users to login to their accounts (given a public_id) with only their sign-in method of choice displayed. This will be used to redirect users to the correct sign-in method when there is an error relating to the use of a different sign-in method on the same email

fix(middleware.py): support login urls with params

feat(LoginExistingUser): support for ProConnect

feat(LoginExistingUser): support for return button

fix(login_existing_user.html): spacing
allows us to remove code duplication between identity providers. Makes more obvious to new readers that certain IDPs serve only certain user kinds

refactor(openid_connect): rename utility function
@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch 2 times, most recently from 2a2768c to 0ec338e Compare October 21, 2024 12:51
…isting login

for better UX, when the user encounters that the email address is in use by another account, we provide them with the option to login via one link to the existing account

fix(tests): remove unittest_compatibility

changes from another PR

fix(test_callback_redirect_on_email_in_use_exception): typo
@calummackervoy calummackervoy force-pushed the calum/bloquer-remplacement-sso-error-message branch from 0ec338e to 82cfdf2 Compare October 21, 2024 13:48
Copy link
Member

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autrement ça m’a l’air de bien fonctionner 👍

login_routes = [reverse(f"login:{url.name}") for url in login_urls.urlpatterns] + [reverse("account_login")]
skip_middleware_conditions = [
request.path in login_routes,
request.path.startswith("/login/"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne comprends pas pourquoi ce changement est meilleur ? Le fait qu’on inclue actuellement sous le chemin /login ne garantie pas qu’on continue de le faire. Énumérer les vues de l’app login me paraît plus sûr ?

Exemple au hasard, si on décide de renommer nos URLs pour être en français, /connexion ne sera pas exclue du middleware, alors que la méthode actuelle devrait continuer à fonctionner.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je vois le souci, on ne peut pas reverse la nouvelle vue, car on n’a pas d’UUID, et request.resolver_match n’est apparemment pas encore disponible. Comme on a déjà plein de startswith, j’imagine qu’un de plus ne pose pas tant de problème.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est vrai mais il y a déjà des autres lignes impliquées par cette contrainte, e.g. request.path.startswith("/signup/siae/join")

Je l'ai ajouté avec la nouvelle vue (login/existing/xyz) - le paramètre xyz empêche l'utilisation du list simple, et je voulais éviter augmenter le compte des lookups - il me semblait un bon compromis entre ces deux concernes ?

@calummackervoy calummackervoy added this pull request to the merge queue Oct 21, 2024
Merged via the queue into master with commit 757caaf Oct 21, 2024
9 checks passed
@calummackervoy calummackervoy deleted the calum/bloquer-remplacement-sso-error-message branch October 21, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC ajouté Ajouté dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants