Skip to content

[FEATURE] Ajouter une validation de l'email dans les liens de l'email d'avertissement de connexion après un an d'inactivité (PIX-16127) #11420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

theotime2005
Copy link
Contributor

@theotime2005 theotime2005 commented Feb 14, 2025

🥞 Problème

Lorsque l'utilisateur reçoit l'email lui indiquant une reconnexion après 1 an, on souhaite que, s'il clique sur le lien de réinitialisation de son mot de passe ou sur le lien du support, on en profite pour valider son email.
Cela est utile notamment pour les personnes n'ayant jamais confirmé leur email à leur inscription.

🥓 Proposition

Ajouter une validation d'email avec la redirection sur la page de réinitialisation du mot de passe, ou bien sur la page du support. Au clic sur ces liens, la valeur emailConfirmedAt sera mise à jour et l'adresse mail validée.

🧃 Remarques

Pour cet email, on a fait en sorte que la locale de l'utilisateur détermine si l'email renvoie vers pix.fr ou pix.org. Cependant, cette solution ne s'applique qu'à un seul élément et ne peut pas perdurer dans le temps.

😋 Pour tester

  • Se connecter à scalingo en sql:
scalingo -a pix-api-review-pr11420 psql-console
  • Modifier l'adresse email pour qu'elle pointe vers une adresse email valide:
UPDATE "users" SET "email" = '<votre_email@pixmail.org' WHERE "email" = 'old-connexion@example.net';
  • Se rendre sur Pix admin et se connecter avec le compte superadmin@example.net,
  • Aller sur la page des utilisateurs et rechercher son email,
  • Afficher l'utilisateur "Old Connexion" et aller dans les méthodes des connexion,
  • Constater que l'email n'est pas confirmé,
  • Ouvrir une autre page sur Pix app,
  • Se connecter avec son email (celui qui a été utilisé dans la commande sql),
  • Constater qu'on arrive bien sur la page d'accueil,
  • Sur Pix admin, constater que la date de connexion a changé, mais pas la confirmation de l'email,
  • Ouvrir sa boîte mail,
  • Constater la présence du mail de Pix indiquant une nouvelle connexion,
  • Cliquer sur le lien pour réinitialiser son mot de passe ou celui du support juste en dessous,
  • Retourner sur Pix admin,
  • Constater que la date actuelle est au niveau du champ de la confirmation d'email,
  • Remettre les seeds pour ceux qui passeront derrière:
scalingo -a pix-api-review-pr11420 run npm run db:seed

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch 4 times, most recently from ea5c9cd to 0f5977a Compare February 17, 2025 14:15
@theotime2005 theotime2005 marked this pull request as ready for review February 17, 2025 14:28
@theotime2005 theotime2005 requested a review from a team as a code owner February 17, 2025 14:28
@theotime2005 theotime2005 added 👀 Tech Review Needed 👀 Func Review Needed Need PO validation for this functionally and removed Development in progress labels Feb 17, 2025
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from 0f5977a to aba50e2 Compare February 17, 2025 15:28
@theotime2005 theotime2005 added Development in progress and removed 👀 Tech Review Needed 👀 Func Review Needed Need PO validation for this functionally labels Feb 17, 2025
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from aba50e2 to ca04c77 Compare February 18, 2025 13:44
@theotime2005 theotime2005 added 👀 Func Review Needed Need PO validation for this functionally and removed Development in progress labels Feb 18, 2025
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from ca04c77 to c3536cf Compare February 18, 2025 17:05
@bpetetot bpetetot changed the title [FEATURE] Ajouter une validation de l'email dans les liens de l'email d'avertissement de connexion après un an d'innactivité (PIX-16127) [FEATURE] Ajouter une validation de l'email dans les liens de l'email d'avertissement de connexion après un an d'inactivité (PIX-16127) Feb 19, 2025
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from a9bba5a to bbba3f2 Compare February 19, 2025 10:09
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from bbba3f2 to 23230ca Compare February 19, 2025 15:15
@theotime2005 theotime2005 removed the 👀 Func Review Needed Need PO validation for this functionally label Feb 20, 2025
@Libouk Libouk added 👀 Tech Review Needed 👀 Func Review Needed Need PO validation for this functionally and removed Development in progress labels Feb 20, 2025
@Libouk Libouk force-pushed the pix-16127-validate-redirection-email-url branch from 23230ca to d2aa5c0 Compare February 20, 2025 09:02
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from d2aa5c0 to 736aeff Compare February 21, 2025 08:20
@EmmanuelleBonnemay EmmanuelleBonnemay added Func Review OK PO validated functionally the PR and removed 👀 Func Review Needed Need PO validation for this functionally labels Feb 24, 2025
Copy link
Contributor

@EmmanuelleBonnemay EmmanuelleBonnemay left a comment

Choose a reason for hiding this comment

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

Lu et testé fonctionnellement (locales fr, fr-FR, en) en RA

@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch 2 times, most recently from 6d28154 to 2199496 Compare February 24, 2025 10:48
@P-Jeremy P-Jeremy force-pushed the pix-16127-validate-redirection-email-url branch from 2199496 to a871788 Compare February 24, 2025 13:28
theotime2005 and others added 4 commits February 24, 2025 16:15
Co-Authored-By: Quentin Lebouc <35962680+Libouk@users.noreply.github.com>
Co-Authored-By: Jérémy PLUQUET <37305474+P-Jeremy@users.noreply.github.com>
Co-Authored-By: Jérémy PLUQUET <37305474+P-Jeremy@users.noreply.github.com>
@theotime2005 theotime2005 force-pushed the pix-16127-validate-redirection-email-url branch from a871788 to dd9b1d7 Compare February 24, 2025 15:15
@pix-service-auto-merge pix-service-auto-merge merged commit 9d542b1 into dev Feb 24, 2025
9 of 11 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the pix-16127-validate-redirection-email-url branch February 24, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants