Files
sales-trainer/backend/app/auth/users.py
Macky 1867a1aac8 fix(auth): login resolves by EITHER username or email
Root cause of 'wrong password' right after logout->login (no redeploy): after first-run
setup sets an email, users naturally type their EMAIL in the login field, but verify()
only looked up by USERNAME -> user not found -> 'invalid credentials' shown as wrong
password. Now verify(ident) = get_user_or_none(username) OR by_email(ident). Verified:
login by username (200) and by email (200) both work with the new password.

Tests: m0/setup/e2e all pass.
2026-08-07 21:00:15 +07:00

7.2 KiB