Validate login (errors)

Topic summary

A developer is building a login page and wants to display specific error messages that distinguish between different failure reasons:

Current behavior:

  • Using Shopify’s default login form (~/customers/login)
  • Returns generic “Incorrect email or password” error for all login failures
  • Same error appears whether the email is wrong or the password is incorrect

Desired behavior:

  • Separate error messages like “Wrong password” or “There’s no account for this email”
  • More granular feedback to help users understand what went wrong

Status: The question remains open, with at least one other user expressing interest in the same functionality. No solution or workaround has been provided yet.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Hello! I develop a Login page and need some help with errors on the login page.

I want to know if I can get different messages with specific reasons for errors like

Wrong password

or

There's no account for this email

Because now, when I type the wrong email and right password I get an error

Incorrect email or password.

But when I type the right email and wrong password I get the same error.
I am using the same ~/customers/login form that’s the default Shopify 2.0
Thanks!

2 Likes

In need of this too