Skip to content

fix: improve handling of disabled accounts#3461

Draft
Anty0 wants to merge 1 commit intomainfrom
jirikuchynka/fix-disabled-accounts
Draft

fix: improve handling of disabled accounts#3461
Anty0 wants to merge 1 commit intomainfrom
jirikuchynka/fix-disabled-accounts

Conversation

@Anty0
Copy link
Collaborator

@Anty0 Anty0 commented Feb 6, 2026

Summary

  • Disabled accounts are now properly detected during login, sign-up, and third-party auth flows
  • Login returns a specific user_account_disabled error instead of generic "bad credentials"
  • Sign-up detects disabled accounts gracefully instead of causing a database constraint violation
  • Added findActiveOrDisabled() repository method that finds non-deleted users regardless of disabled status
  • Frontend maps the new error code to a user-friendly message directing users to contact their org owner or server admin

Closes #3276

Summary by CodeRabbit

  • New Features

    • Enhanced authentication flows with improved error handling for disabled accounts. Users attempting to sign up or log in with a disabled account now receive a clear, specific error message indicating the account is disabled.
  • Tests

    • Added tests for disabled account authentication scenarios.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jirikuchynka/fix-disabled-accounts

Comment @coderabbitai help to get the list of available commands and usage tips.

Check for disabled accounts before throwing generic errors. Login now
returns a specific error instead of "bad credentials", and sign-up
detects disabled accounts instead of causing a constraint violation.

Closes #3276

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Anty0 Anty0 force-pushed the jirikuchynka/fix-disabled-accounts branch from fc9c993 to 18a98ec Compare February 6, 2026 16:24
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.

Improve handling of disabled accounts

1 participant