Skip to content

Refactor login lockout feedback/senan#78

Open
techguysenan wants to merge 118 commits intoHardhat-Enterprises:mainfrom
techguysenan:refactor-login-lockout-feedback/senan
Open

Refactor login lockout feedback/senan#78
techguysenan wants to merge 118 commits intoHardhat-Enterprises:mainfrom
techguysenan:refactor-login-lockout-feedback/senan

Conversation

@techguysenan
Copy link
Copy Markdown

Description

This PR improves the authentication security and user experience by refactoring the login lockout mechanism.

Changes Made

Replaced legacy loginAttempts usage with security.failedLogins and security.lockUntil
Added dynamic tracking of failed login attempts
Implemented account lockout after threshold is reached
Added attemptsLeft feedback in login responses
Reset failure counters on successful login
Removed outdated loginAttempts reset logic

Testing

Tested using Postman with valid and invalid login credentials
Verified correct responses:
401 for invalid credentials
423 for locked accounts
429 from rate limiter
Confirmed database updates in MongoDB Atlas:
failedLogins increments correctly
lockUntil set when threshold reached

Outcome

This improves backend security by preventing brute-force attacks and enhances user experience by providing clear feedback during login failures.

Oko8 and others added 30 commits April 3, 2025 14:35
…ses,Common scam email domains or patterns,Common URL patterns and use of special characters
Co-authored-by: OKO8 <okoraforokechukwu@gmail.com>
Co-authored-by: Pasindu P <99115820+dec1belPP@users.noreply.github.com>
Co-authored-by: Pasindu P <99115820+dec1belPP@users.noreply.github.com>
added space to bodyParserfrom
change to ES module
…ice/pasindu

feat(ml-microservice): add /scan endpoint
… /api/feedback; tested with Postman and ensured data is saved to MongoDB successfully.
…ng, IP/device checks, and account lockout mechanism; update dependencies and add utility functions for IP handling and user agent analysis.
Ed-ward-Harris and others added 30 commits September 18, 2025 22:02
feat(ml+api): add FastAPI ML service, /api/reports endpoint, training pipeline & advice
Added full feedback backend, Implement enhanced login security features
Integrate FAQ backend: routes and seed data
…ckup-codes

Feature-Backup codes support for authentication flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.