How do I get password fields to be autofilled without requiring user interaction?

坚强是说给别人听的谎言 提交于 2019-12-02 06:47:26

You cannot do this using Google's built-in password storage because, as you stated yourself, Chrome requires user interaction to enable such passwords -- as a security feature.

Specifically, Chrome requires an event with the isTrusted property set to true. Tampermonkey cannot work around this because even Chrome extensions are not able to set the isTrusted property.

See also, this related feature request from 2015.

One solution is to use a password manager that fills these fields without using Google's built-in storage.
There are many available, with varying degrees of cross-device, and cross-browser, support.

Or you can write your own Tampermonkey script to fill in these fields, irregardless of what Chrome has stored.

If you do write a Tampermonkey script, I recommend that you use a secure storage framework, don't hardcode login info into the script.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!