How to fix username/password authentication bug in Chrome when Google auth works fine? Answered
I'm having a username/password authentication bug (not happening on Google auth), can someone help? https://www.loom.com/share/924188f1848f4e779801423dfe9e5b9c
My Webflow configuration checking for password length: https://www.loom.com/share/095c0f068f61413089749a71f3396610
bug is happening across normal Chrome and incognito Chrome
Comments
2 comments
Problem is when clicking the “View password” button, the input is changing to data-ms-member=“text”
I recommend only changing the type of the input when that eye icon is clicked.
type=“password” shows the dots
type=“text” shows the actual value
Nothing else in the input needs or should change.
not 100% following. Here is the JS I have for the "Show/Hide logic"
used chatGPT to rewrite the JS and solved, thanks!
function transform() {//copy the element itself and value text to a variable
var myInput = document.querySelector("[data-show]");
var text = myInput.value;
if (isPassword) {
// Change the type to "text" if it is a password field
myInput.type = "text";
} else {
// Change the type to "password" if it is a text field
myInput.type = "password";
}
// Restore the text value
myInput.value = text;
// Toggle the isPassword flag
isPassword = !isPassword;
}
Please sign in to leave a comment.