feat: require password confirmation to delete account (#66) - #68
Merged
thermcampos merged 3 commits intoAug 30, 2026
Merged
Conversation
The delete-account endpoint is now POST /rest/user-sessions/delete-account with a JSON body carrying the current password, replacing the bodyless DELETE. The password is verified before any deletion work begins; on mismatch the request fails, nothing is deleted, and the attempt is recorded against the existing login rate limit (3 failures in 3 minutes). Verification happens before the delete transaction opens (in the controller) so a wrong password does not open a transaction whose rollback would wipe the recorded attempt. Each downstream deletion already runs in its own transaction, so the service method no longer needs one. The confirmation dialog gains a password field with show/hide toggle and an inline error region: wrong password shows the error in place, clears the field, and keeps the dialog open; success signs the user out and clears local storage. The dialog also resets its state when dismissed and disables the confirm button while submitting or when the field is empty. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6 tasks
thermcampos
deleted the
feat/66-require-password-confirmation-to-delete-account
branch
August 30, 2026 22:16
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.
Closes #66.
Why
Deleting an account previously took a single click on an inline confirmation. This adds a password gate: after clicking "Delete all my data", the user must type their current password before anything is deleted.
What changed
POST /rest/user-sessions/delete-accountwith a JSON body (DeleteAccountRequest,@NotBlank password), replacing the bodylessDELETE.AuthService.verifyCurrentPasswordreusescheckLoginAttemptLimit(3 failures / 3 minutes) and records aUserPwdLimitEntityon mismatch, then throwsInvalidCredentialsException. On success the rate-limit rows are wiped with the account as before.@Transactionaland was rolled back on failure, so the rate limit never engaged. Each downstream deletion already runs in its own transaction, so the service method no longer needs one.data-testid="delete-account-error"). Wrong password shows the error in place, clears the field, and keeps the dialog open; success signs out and clears local storage. The dialog resets state when dismissed and disables the confirm button while submitting or when the field is empty.Both quality gates pass:
tools/check-backend.sh(checkstyle, compile, unit + integration, JaCoCo) andtools/check-frontend.sh(lint, build, 118 tests).💘 Generated with Crush