How do password managers (in browsers) discover user and password fields, and how to force this detection?

I am trying to understand how password managers detect user and password field in forms. I think the password field is found by looking for the [type = "password"] input, and the user field is the direct previous input (hidden text, text, email, etc.).

/ ***** EDITED **** /

Confirmed for example: I have two forms

F1 = name, email, password

F2 = email address, name, password

So I save my password in the first form, PM stores "email" and "pass".

The second form is then populated with the email value in the field name.

/ ***** END EDITED **** /

But this causes too many errors and it is very common, even in some well-known sites and frameworks.

Is there a way to explicitly specify which fields should be stored? I have not found any information on the internet.

I only find this suggestion: http://www.mypico.org/documents/2014-StajanoETAL-api.pdf but not implemented yet (and probably never)

+3


source to share





All Articles