简体   繁体   English

如何确保 Google 密码管理器将正确的字段存储为用户名?

[英]How do I ensure Google Password Manager stores the correct field as the username?

Background背景

I'm a freelance web developer with a client who runs a meal-planning business .我是一名自由职业者 web 开发人员,有一位经营膳食计划业务的客户。 I developed a web app for her clients to use to view their meal plans.我为她的客户开发了一个 web 应用程序,用于查看他们的膳食计划。

The problem问题

One of my client's new clients sent her a screenshot from their phone showing her at the login page, with Google Password Manager suggesting her username was "165", instead of her actual username (her email address).我客户的一位新客户向她发送了一张手机屏幕截图,显示她在登录页面,Google 密码管理器提示她的用户名是“165”,而不是她的实际用户名(她的 email 地址)。

在此处输入图像描述

My guess at what's happening我对正在发生的事情的猜测

When clients are signing up, they need to fill out an onboarding survey (implemented as an HTML form that gets POSTed to the back-end) that asks them various questions.当客户注册时,他们需要填写一份入职调查(以 HTML 形式发布到后端),向他们提出各种问题。 One of the fields at the top asks for the client's email address, and one of the fields at the bottom asks the client to provide a new password.顶部的字段之一要求客户提供 email 地址,底部的字段之一要求客户提供新密码。 And one of the fields in the middle asks for the client to provide a "weight goal" (the weight they'd like to reach).中间的一个字段要求客户提供“体重目标”(他们想要达到的体重)。 It seems the client filled out her weight goal as being 165 pounds (in an input field of type "number").客户似乎将她的体重目标填写为 165 磅(在“数字”类型的输入字段中)。 My best guess is that somehow Google's Password Manager ended up thinking that that was her username.我最好的猜测是 Google 的密码管理器以某种方式最终认为那是她的用户名。

在此处输入图像描述

My question我的问题

How can I prevent this from happening in the future?我怎样才能防止这种情况在未来发生?

I just used information from Chrome - Would you like to save this password?我刚刚使用了来自Chrome 的信息 - 您要保存此密码吗? prompt getting incorrect value 提示获取错误值

setting autocomplete: 'username' on my email field helped in my case.在我的 email 字段上设置自动完成:“用户名”对我的情况有所帮助。

Others found putting the username field right before password did the trick, and someone did that by using a hidden field.其他人发现将用户名字段放在密码之前就可以达到目的,有人通过使用隐藏字段来做到这一点。 There doesn't appear to be a conclusive answer yet似乎还没有定论

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Chrome会存储新密码,但不会将其链接到当前用户名:如何解决? - Chrome stores the new password but does not link it to the current username: how can I fix it? 如何找到正确的用户名和密码标签? - How can I locate the correct username and password tags? 如何设置正确的用户名和密码文本框? - How to set the correct username and password textboxes? 如何进行文件下载需要用户名和密码 - How do I make a file download require a username and password 我如何使用回车键提交用户名和密码 - how do i use an an enter key stroke to submit a username and password 如何测试输入的用户名和密码是否已注册 - How do i test that an inputted username and password is registered 如何使密码和用户名标签彼此居中 - how do i make the password and username tabs centerd to eachother 如何确保自动完成适用于特定字段? - How do I ensure autocomplete works for a specific field? 你如何用 HTML 制作一个只有一个正确用户名和一个密码的登录页面屏幕? - How do you make a login page screen with HTML which only has one correct username and one password? 用户输入正确的用户名和密码后,如何使提交按钮重定向到另一个页面? - How do you make a submit button redirect to another page after the user has inputted the correct username and password?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM