Skip to content

Comments

Improve error message for email/password sign-in on OAuth accounts#1316

Open
ashishyk018-byte wants to merge 2 commits intofirebase:mainfrom
ashishyk018-byte:improve-email-password-error
Open

Improve error message for email/password sign-in on OAuth accounts#1316
ashishyk018-byte wants to merge 2 commits intofirebase:mainfrom
ashishyk018-byte:improve-email-password-error

Conversation

@ashishyk018-byte
Copy link

Fixes #1313

Improves the error message shown when Email/Password sign-in is attempted
for accounts originally created via OAuth, without relying on deprecated
auth APIs.

Manually verified the updated error handling logic.

@google-cla
Copy link

google-cla bot commented Jan 28, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ashishyk018-byte
Copy link
Author

Thanks! Happy to make any changes if needed 🙂

@russellwheatley
Copy link
Member

Hi @ashishyk018-byte - Thank you for the PR. We haven't made a decision on the best approach to this particular issue at this moment in time, but I'll let you know when a decision has been made 🙏

@ashishyk018-byte
Copy link
Author

Thanks for the update! 👍
Happy to adjust the approach or make changes once a direction is decided.

@ashishyk018-byte
Copy link
Author

The relevant change for this PR is the commit Clear form validation errors when input is corrected

if (error instanceof FirebaseUIError) {
// Improve UX for users who previously signed up via OAuth and
// attempt Email/Password sign-in.
if (error.code === "auth/invalid-password") {
Copy link
Member

Choose a reason for hiding this comment

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

@ashishyk018-byte - I'd remove all other code changes (except in this PR) as they have been resolved in a different PR. Also - add something similar to angular as well, this is only for react at the moment.

Finally - add a test that demonstrates that this error message is produced. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback!
I'll remove the unrelated code changes and keep only the relevant updates in this PR.
I'll also implement similar changes for Angular and add a test case to demonstrate the error message as suggested.
Will update the PR shortly.

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.

Trying to log in with Email+Password when already logged in with OAuth previously only shows "Incorrect password"

2 participants