Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting iOS password AutoFill to work with a "change password" page

I've gotten iOS password autofill to work with "login" and "new account" pages but not a "change password" page. I have 4 UITextFields on that page. 1 with .email as the content type, 1 with .password as the content type for the original password, and 2 with .newPassword as the content type for the new password.

The autofill tries to fill in the .password and first .newPassword fields with a new generated password and the last field is blank. I've tried switching the order but then the password doesn't get updated in keychain.

I tried only having the 2 .newPassword fields but it still doesn't update they keychain.

Does anyone know how to get it to work or if there is a tutorial on a best practice for "change password" screens? Apples documentation only covers login and new account.

thanks.

like image 808
MJLyco Avatar asked Sep 18 '18 15:09

MJLyco


1 Answers

I experience the same problem: AutoFill fills old password and new password field with the same generated password.

I solved this by moving the old password field up above the username.

  • Current password (content type: password)
  • Username (content type: username) (in my case this is a non editable pre-filled text field)
  • New password (content type: newPassword)

It's a bit strange but after the view controller dismisses the keychain password is updated immediately without confirmation.

like image 86
cornr Avatar answered Nov 15 '22 04:11

cornr