Skip to content

Validation/signup+login#51

Merged
ademboukabes merged 9 commits into
developfrom
validation/signup+login
Jun 1, 2026
Merged

Validation/signup+login#51
ademboukabes merged 9 commits into
developfrom
validation/signup+login

Conversation

@Tyjfre-j
Copy link
Copy Markdown
Collaborator

@Tyjfre-j Tyjfre-j commented Jun 1, 2026

Fixes the mobile auth hardening issues documented in docs/problem-fixes/:

  • Reject empty, whitespace-only, oversized, or unnormalized auth fields.
  • Split ambiguous register/login behavior into explicit /register and /login flows.
  • Bound mobile auth email length to 255 chars to match DB constraints.
  • Handle concurrent signup duplicate-email races as 409 Conflict.
  • Prevent bcrypt 72-byte truncation by SHA-256 pre-hashing before bcrypt.
  • Enforce registration password complexity.
  • Add Redis-backed rate limiting for mobile register/login by email and client IP.
  • Update Pydantic v2 config usage for worker/settings models.

Tyjfre-j added 9 commits May 31, 2026 08:54
- Replace ambiguous /user/auth/register-login with explicit /register and /login
- Add MobileRegisterRequest and MobileLoginRequest schemas (shared base)
- Add AuthService.mobile_register() (409 on existing email) and mobile_login() (401 on unknown email)
- Update e2e validation test to target both new endpoints instead of removed register-login
- Add unit + e2e tests for intent validation
- Add problem-fix documentation (002)
@ademboukabes ademboukabes self-requested a review June 1, 2026 13:54
Copy link
Copy Markdown
Collaborator

@ademboukabes ademboukabes left a comment

Choose a reason for hiding this comment

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

Excellent work on this PR, the implementation of all 8 security points is extremely solid

@ademboukabes ademboukabes merged commit fdf0610 into develop Jun 1, 2026
1 check passed
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.

2 participants