-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unverified user login attempts still getting generic error on V3 #11358
Comments
Currently I use custom login endpoint as workaround to return custom error if the user is not validated.
|
Hi @nfl001 and Payload CMS team, I'd like to contribute to resolving this issue. I understand that when
Proposed Solution:I plan to:
Benefits:
Next Steps:
Please let me know if there are any guidelines or preferences I should follow while implementing this fix. Looking forward to your feedback! |
Hi @RaghavJha1965 love to hear that. I am also new in term of using payload CMS, not really sure how the default auth workflow works. Totally excited to see your solution implemented. |
Describe the Bug
This issue is similar to #5040 in V3. When logging into an auth-enabled collection that requires email verification, users who haven't verified their email get a generic error:
AuthenticationError: The email or password provided is incorrect.
Instead, the error should clearly state that email verification is required, helping users understand why they can't log in and directing them to check their email.
Link to the code that reproduces this issue
https://github.com/nfl001/payload
Reproduction Steps
auth.verify
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: