ususdei / qute-keepassxc

Qutebrowser userscript to fetch credentials from KeepassXC password database
MIT License
55 stars 10 forks source link

Support for websites that show only a username field. #17

Open SkettiSouls opened 1 month ago

SkettiSouls commented 1 month ago

When trying to use the userscript on sites that show only the username field initially (i.e. twitter), I get a popup saying "No Credentials form found".

The plugin for other browsers handles this with the "Add Username-only option for this site" after redecting login fields, is there anything similar that can be done with the userscript?

Error: error

Other Browsers' Solution: image

ususdei commented 1 month ago

Yeah, the difficulty here is mainly detecting a form which is supposed to be a login form. This plugin currently does this by searching for password fields ( in hasPasswordField() ) since password fields can be detected easily and reliably. Unfortunately I'm not aware of any reliable way to detect username fields. Oftentimes they are just plain text fields. So we would have to maintain some reasonably reliable heuristics for that. For X.com only the autocomplete="username" propertly seems to be usable at all. I don't know how well this works for other sites.

So I'd like to suggest the following: We collect more sites that use those odd login forms in the comments of this item. When we have collected enough of them, we can inspect their login forms and see whether we can come up with a resonably good heuristic to identify username fields.

ususdei commented 1 month ago

https://X.com

SkettiSouls commented 1 month ago

I see, is hasPasswordField() a javascript thing? That would explain certain sites (for example kingdom of loathing which is like entirely php afaik) not being able to detect login fields.

SkettiSouls commented 1 month ago

image google is another site that does username only at first.