Skip to content
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

fix: return updated failed login attempts (#4474) #808

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

ColinBuyck
Copy link
Collaborator

RELEASE
This PR addresses bloom-housing#4473

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

Description

This PR changes the function isUserLockedOut to return the verified failedLoginAttempts count explicitly. Before, it was failing to reset after the lockout period was over because of an assumption that it was pass by reference rather than value.

How Can This Be Tested/Reviewed?

Note that there is an existing bug in core: bloom-housing#4284

This can be tested locally by locking out a public user via 5 failed password attempts (you'll have to verify in network tab). Then, go into the DB and set that user's last login at date to be last year. Lastly, try to log in again with an incorrect password and see that the count has been reset (via the network tab).

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

* fix: return updated failed login attempts

* fix: testing coverage

* fix: update naming

* fix: testing tweak
@ColinBuyck ColinBuyck added 1 review needed release A PR that is pulling over a commit(s) from core labels Nov 14, 2024
Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for housing-sanjoseca-gov ready!

Name Link
🔨 Latest commit f451464
🔍 Latest deploy log https://app.netlify.com/sites/housing-sanjoseca-gov/deploys/673648f4cdae700008c2f296
😎 Deploy Preview https://deploy-preview-808--housing-sanjoseca-gov.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 site configuration.

Copy link
Collaborator

@mcgarrye mcgarrye left a comment

Choose a reason for hiding this comment

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

LGTM

@ColinBuyck ColinBuyck merged commit 7774d7c into main Nov 25, 2024
37 checks passed
@ColinBuyck ColinBuyck deleted the 4473/failed-login-count branch November 25, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge release A PR that is pulling over a commit(s) from core
Development

Successfully merging this pull request may close these issues.

2 participants