Differentiate manual login failures for unknown account vs invalid password#48
Draft
Copilot wants to merge 3 commits into
Draft
Differentiate manual login failures for unknown account vs invalid password#48Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/yokesh-kumar-M/Piicasso/sessions/dda898e3-74e0-43a7-ba65-b718c073ad02 Co-authored-by: yokesh-kumar-M <119868649+yokesh-kumar-M@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yokesh-kumar-M/Piicasso/sessions/dda898e3-74e0-43a7-ba65-b718c073ad02 Co-authored-by: yokesh-kumar-M <119868649+yokesh-kumar-M@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix login error messages for non-existent email or wrong password
Differentiate manual login failures for unknown account vs invalid password
May 12, 2026
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.
Manual login currently returns the same error for both nonexistent email/username and incorrect password, which makes recovery flow ambiguous for real users. This change updates the JWT login path to return distinct failure messages for those two cases while preserving existing token/lockout behavior.
Auth error mapping in token serializer
MyTokenObtainPairSerializer.validate()inbackend/wordgen/auth_views.py.super().validate(...)as the primary auth path, then mapped failed auth outcomes into:No account found for this email/username.Incorrect password.Focused auth tests
AuthTokenTestinbackend/wordgen/tests.pyto assert message-level behavior for:Behavioral example
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.pwnedpasswords.com/usr/bin/python python manage.py test --verbosity=1(dns block)If you need me to access, download, or install something from one of these locations, you can either: