I’ve noticed that the default password field in Bubble renders in HTML with the attribute
autocomplete="new-password", even if the password field is in a login (not signup) context. The effect is that my password manager is always suggests generating a new password in that field instead of filling in with the already-saved password (saved username populates just fine). How are people working around this, or is it something the Bubble team can change?
I see someone worked around it by changing default signup/login priorities, but is there a more robust solution to this?
Log In Asks to Create a New Stong Password - Question - Bubble Forum
Welcome to the Bubble community!
I have noticed it too. Maybe we can file a bug report with bubble and see if they can do anything about it. I’m not sure if we have any control over it.
I would also be curious to see if anyone has an actual workaround for this.
It might be some code that needs to be added.
For All Your No-Code Education Needs:
- One-on-One Tutoring
- eLearning Hub
- Video Tutorials
Hello @mike17, @J805.
This happens because input passwords by default, as mentioned by you guys, have
So the browsers / passwords managers / extensions (…whatever…) Interpret that field it’s a sign-up one, and that’s why they suggest a new password even if the field it’s used for a login purposes.
Bubble could offer a dropdown in the input properties with election type: (sign up field or login field) and changing the
autocomplete type depending on the election.
As you can see here:
"autocomplete" attribute has multiple possible choices. The one we’re looking for, would be:
autocomplete="current-password" ⇾ This attribute value will indicate to the browser (or whatever we are using as password manager), that field is a password field that doesn’t need any “new password” suggestion.
This should be pretty easy, we just need to overwrite the
"autocomplete" attribute for the specific field using JS.
(In the left input the browser suggest a strong (new) password, while in the right it only suggests saved passwords).
Demo: Bubble | No-code apps
Editor: Anti-dup | Bubble Editor
@J805 I don’t think this could be “listed as bug”, but looks a good feature to submit in the Ideaboard
That makes sense. Yes, great idea for the idea board. Especially since you already know the code for it.
I will definitely be adding this piece of code to my workflow. Thanks!
I got this solution working, too. Thanks!
However the page loaded condition it’s just an example for demo purpose. You could run lately the JS at your election
I just made this update to my site. What a relief to finally have this fixed. Thanks again @yusaney1 for that bit of code we can add. I will definitely be saving this for future use.
No id in my password input. I adapted the fix as below
Honestly, it would be so nice if there were a setting for inputs of type password that asks what the password input is being used for:
- Setting a new password (autocomplete=“new-password”)
- Using an existing account password ( autocomplete=“current-password”)
My browser (Opera, which is Chromium-based) thinks the email/password fields are an address form and isn’t recognizing it’s a login form, so it would be awesome if email fields had some kind of way to designate what it’s being used for to improve browser behavior and UX.