GNOME Bugzilla – Bug 699606
Should pre-fill passwords for other users for whom a password was saved
Last modified: 2013-08-14 11:38:25 UTC
When you login with a different user on a site where you already have a stored password, Epiphany will offer to save the password and will do so if you tell it to, but there is no way to have it pre-fill the password field for the old user.
Created attachment 243222 [details] [review] Pre-fill password field when the username field loses focus This change makes Web pass the username as a query attribute when querying the secrets service when the username field loses focus, and pre-fills the password field with the one that was stored for the username the user typed in the username field.
So without this patch we basically just get some default return value from secret right? The first one we entered in the table that matches the form username/password attributes?
Oops, had missed your reply! Right, apparently "default" means the last saved one. I started working on a follow-up patch that would add UI that shows the available users, slowly pushing it forward.
Review of attachment 243222 [details] [review]: ::: embed/web-extension/ephy-web-extension.c @@ +372,3 @@ + char *username_field_value = NULL; + + g_object_get (ephy_embed_form_auth_get_username_node (form_auth), Shouldn't it suffice with using username_node directly from the function parameters? @@ +376,3 @@ + NULL); + + pre_fill_form (form_auth, username_field_value); I am not sure, but I think it should be possible to get the username field value in pre_fill_form() instead? I don't think we need to query it here. ::: lib/ephy-form-auth-data.h @@ +49,3 @@ const char *form_username, const char *form_password, + const char *username, I would place this parameter following the form_username one.
Created attachment 250807 [details] [review] Pre-fill password field when the username field loses focus This change makes Web pass the username as a query attribute when querying the secrets service when the username field loses focus, and pre-fills the password field with the one that was stored for the username the user typed in the username field.
(In reply to comment #4) > ::: lib/ephy-form-auth-data.h > @@ +49,3 @@ > const char *form_username, > const char *form_password, > + const char *username, > > I would place this parameter following the form_username one. I chose to do it like this so that it would be the same order used in the other calls that use those same parameters. I can move it if you think it'd be better, but I would prefer matching the other functions' order.
Review of attachment 250807 [details] [review]: Looks good now, thanks!
Comment on attachment 250807 [details] [review] Pre-fill password field when the username field loses focus b99f082db53c71fc71080cd2283df2b95116b043
Thanks!