Skip to content

fix: add last login at to update password flow (#1532)#6354

Open
ludtkemorgan wants to merge 1 commit into
mainfrom
update-password-fix
Open

fix: add last login at to update password flow (#1532)#6354
ludtkemorgan wants to merge 1 commit into
mainfrom
update-password-fix

Conversation

@ludtkemorgan
Copy link
Copy Markdown
Collaborator

This PR addresses #5218 and #5219

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

NOTE: this has already been merged into Doorway

During last minute testing it was identified that there are users in the system that the last_login_at field is not up to date. This happens when the last time a user logged in was via the forgot password flow. In that flow we were not updating the last_login_at field.

This causes issues because that is the field we are using to determine if a user should be both deleted as well as warned of deletion. The fix is to both update that flow to start setting that field as well as updating both of those cron jobs to look at the password_updated_at field

Also, after doing checks on how many people will get deleted in the first run I realized it would be close to 13K users. So I added a LIMIT to the number. The first time it is run in production I will run it 13 times to get everyone

How Can This Be Tested/Reviewed?

Go through the whole warn user and delete user flows:

  1. Create several public users
  2. Change their last_login_at to be well in the past
  3. Change their password_updated_at to be well in the past
  4. Run both cron jobs and they should successfully warn and delete those users

Go through the forgot password flow and make sure the last_login_at field is updated

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@ludtkemorgan ludtkemorgan added the 1 review needed Requires 1 more review before ready to merge label May 27, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit d851f33
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6a16fd971f9acc00091d2fda
😎 Deploy Preview https://deploy-preview-6354--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit d851f33
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6a16fd97f9fc2a0009902c6a

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit d851f33
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/6a16fd974ed609000885c0b6
😎 Deploy Preview https://deploy-preview-6354--bloom-public-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit d851f33
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/6a16fd9737145d0008c2739d
😎 Deploy Preview https://deploy-preview-6354--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 review needed Requires 1 more review before ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant