firebase / firebase-js-sdk

Firebase Javascript SDK
https://firebase.google.com/docs/web/setup
Other
4.82k stars 884 forks source link

sendPasswordResetEmail change password and chrome autocomplete new password #8446

Closed ChangJi closed 1 week ago

ChangJi commented 3 weeks ago

Operating System

mac OS

Environment (if applicable)

Chrome 126

Firebase SDK Version

10.7.2

Firebase SDK Product(s)

Auth

Project Tooling

Nextjs

Detailed Problem Description

I use sendPasswordResetEmail to change password, Then I click the links in email, It show me change password and I seleted the password google chrome recommanded with high safe, the password save to Chrome password tools in the email link domain,not my actionCodeSettings url domain. How can I save the new password in my actionCodeSettings url domain with chrome password manager tools?

Steps and code to reproduce issue

  1. sendPasswordResetEmail to change password
  2. click the link in Email
  3. click the input and select the new password, google chrome recommanded with high safe
  4. click save to google chrome password tools, new password save to the email link domain,not my actionCodeSettings url domain
  5. go to my website (actionCodeSettings url domain), click the login input. google chrome password tools not give me the new password, the password is previous and login fail
dlarocque commented 3 weeks ago

Hi @ChangJi, is this not the expected behaviour, since the domain used to reset the password is different than the one used to log in?

I believe you would have to have the user login to the website after resetting their password to have the Chrome password manager save the password for your websites domain.

ChangJi commented 3 weeks ago

Hi @dlarocque, Thanks. When I click the chang password link in Email, it redirect me to this

image

I selected the high safe password recommand and update it, but the google chrome password manager save to movipx-e6758.firebaseapp.com domain is different than my website (continueUrl=http://localhost:3000/login) the one to log in

image

and if user selected the high safe password recommand when user login to my website again, he can not remember the high safe password recommand.

How can I save new_password to my website domain (continueUrl=http://localhost:3000) or is there any config I can do ?

dlarocque commented 3 weeks ago

Hi @dlarocque, Thanks. When I click the chang password link in Email, it redirect me to this

image

I selected the high safe password recommand and update it, but the google chrome password manager save to movipx-e6758.firebaseapp.com domain is different than my website (continueUrl=http://localhost:3000/login) the one to log in

image

and if user selected the high safe password recommand when user login to my website again, he can not remember the high safe password recommand.

How can I save new_password to my website domain (continueUrl=http://localhost:3000) or is there any config I can do ?

If your users are running the app on localhost, and your auth domain is not localhost, there is no way to save the password to Chrome password manager from the auth domain on localhost- I believe this behaviour is expected. If you deploy this application to production under the auth domain, the flow should work.

An idea I have for solving this is maybe setting up a custom auth flow that allows users to reset their password on localhost.

If this isn't a bug or a feature request for Firebase Auth, you may be able to find a solution by contacting https://firebase.google.com/support

google-oss-bot commented 2 weeks ago

Hey @ChangJi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 week ago

Since there haven't been any recent updates here, I am going to close this issue.

@ChangJi if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.