locked account fixes - #657
Open
varmar05 wants to merge 1 commit into
Open
Conversation
- failed_login_attempts counter replaced by LoginHistory.count_recent_failures() over a configurable LOCKOUT_WINDOW, so old failures age out instead of persisting indefinitely until a successful login - LoginHistory now records every login attempt, successful and failed (including from the DB-sync client), instead of only successes - index migration split out and built CONCURRENTLY so it doesn't hold a write-blocking lock on login_history for the duration of the build - login form shows a dedicated message on AccountLocked instead of the raw backend error text Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Coverage Report for CI Build 30906549419Coverage increased (+0.03%) to 92.24%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
MarcelGeo
requested changes
Aug 5, 2026
| await instanceStore.initApp() | ||
| } catch (error) { | ||
| } catch (err) { | ||
| const error = err as AxiosError |
Collaborator
There was a problem hiding this comment.
U can use axios.isAxiosError() method to check if it's error from request and not from code above. Better than forcing as AxiosError
MarcelGeo
requested changes
Aug 5, 2026
| def upgrade(): | ||
| with op.get_context().autocommit_block(): | ||
| op.execute( | ||
| "DROP INDEX CONCURRENTLY IF EXISTS ix_login_history_user_id_successful_timestamp" |
Collaborator
There was a problem hiding this comment.
Is it possible in alembic?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use LoginHistory for account lockout. Enable all attempts to be stored in the table (needs periodic pruning to avoid storing archive data). Also DB-sync agent is now fully tracked in login_history table.
Display custom message in FE when account is locked.