Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 12/Swift Strong Password AutoFill doesn't work as expected

I have set on UITextFields

  • emailTextField -> username, keyboardType email address
  • passwordTextField -> new password
  • confirmPasswordTextField -> new password

This form doesn't work as expected I have no username suggestion, only if the user is connected with a domain in keychain there is like login suggestion

passwordTextField is filled with strong password but not confirm password. Moreover when I choose confirmPasswordTextField then new password is generated for both fields. If I select Own Password then type passwordTextField and try to retype it in confirmPasswordTextField it is suggested again now filling both UITextFields.

It seems to be very messy and stupid, making it hard for the user to properly choose own password or strong password. How to make it work correctly.

The most frustrating thing is that when I select Choose Own Password, text fields are cleared correctly, but once I start typing into my first UITextField then second confirm field is filled with this strong password but without yellow background.

like image 429
Michał Ziobro Avatar asked Oct 16 '25 04:10

Michał Ziobro


2 Answers

I recently had a similar problem, and solved it by setting the type of passwordTextField to .password and the type of confirmPasswordTextField to .newPassword.

like image 88
Tim Avatar answered Oct 17 '25 21:10

Tim


For me It works if I use .password in both fields. Using .newPassword adds some messy things.

like image 39
Michał Ziobro Avatar answered Oct 17 '25 20:10

Michał Ziobro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!