w3c / webappsec-credential-management

WebAppSec Credential Management
https://w3c.github.io/webappsec-credential-management/
Other
50 stars 38 forks source link

Add a method to populate forms with credential data #78

Open battre opened 7 years ago

battre commented 7 years ago

Maybe we should add the reverse of PasswordCredential(HTMLFormElement) to populate a form from a PasswordCredential.

Use case: A website that has existing logic to asynchronously sign-in the user from form data and verify the successful login, could use the function to populate the form.

Note that this could rely on autocomplete attributes or passing in a mapping of fields (fill input[name=username] with credential.id could be passed as {'username': 'id'}). At that points it raises the question whether we should just rely on document.querySelector('input[name=username]').value = credential.id for assignment. So maybe we don't need this?

vasilii-sv commented 7 years ago

Isn't it a duplicate of https://github.com/w3c/webappsec-credential-management/issues/17 ?