I followed this guide:
https://medium.com/developerinsider/ios12-password-autofill-automatic-strong-password-and-security-code-autofill-6e7db8da1810
I created a github page and put the json file in this structure: snguyenevolution1.github.io/.well-known/apple-app-site-association.
I have the file validated here: https://branch.io/resources/aasa-validator/
Here is the entitlement:
There is a saved entry for snguyenevolution1.github.io in keychain. But when I tap on the username/password text field, the quick type row above the keyboard only show Password, not password for snguyenevolution1.github.io.
After tapping on that password and verify my touch ID, it brings up the entire list of all saved password in keychain, and I can literally pick anything from that list. I want it to automatically select the entry like it does in the tutorial.
Could someone please point out what I'm doing wrong? I'm pretty positive that the ids are matched.
Thanks
You should set in entitlement Associated Domains like this applinks:your_domain
References
Support Universal Links in your iOS App
iOS12 - Password AutoFill, Automatic Strong Password, and Security Code AutoFill
Does it do this for all password managers? I use 1Password 7 and it works ok. Look in your accounts and passwords setting and make sure you have a password saved for that specific website.
Related
I am working on a NativeScript iOS app. The app has a login page which requires users to login before they can use the app. I just wanted to add more convenience for the users to not have to type in the username and password everytime. So, I added the nativescript-fingerprint-auth plugin to enable touch/face id, which is working fine.
Now, I also wanted the app to provide an option to save the password to Keychain on the initial login and provide an option to autofill the password in the next login. Much like shown in the screenshot. So any kind of information regarding this would be helpful.
Thank you in advance!
img source
I created a secure area, but I am getting an error like this, what should I do?
This is not an error, this is an iCloud Keychain alert that lets users generate passwords in secure text fields. This is a useful feature for those who don't want to choose a password themselves.
More info about iCloud Keychain
I am setting up iOS Autofill Password in my app, and I followed all the guidelines in this tutorial https://medium.com/developerinsider/ios12-password-autofill-automatic-strong-password-and-security-code-autofill-6e7db8da1810. If I have a manually saved password in the keychain for the app's website, it gives me the option to autofill it on login.
However, when the credentials are not saved, the app does not prompt me to save them on login.
My username and password textfields are with correct content types (just like in your tutorial), I have the apple-app-site-association file configured properly, and the associated domains as well.
I don't understand what I am missing.
You didn't put any log about that. But the AutoFill feature has some tricks that need attention as describe on Robots & Pencils and other question in stack overflow
One attention point if you update the apple-app-site-association remove the app from your device and install again because the app store the last version as a cache.
Verify the TEAM ID on apps in apple-app-site-association because many get confused with the signing id from your account.
Known issue:
[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: app.bundle.id due to error: iCloud Keychain is disabled
Do you need check on your macOS on Internet Account -> iCloud -> Keychain is enabled and verify in your idevice if the feature is enabled on Settings -> Apple ID -> iCloud -> Keychain is On
In the other case if you followed the tutorial correctly it will be working
I had the same problem. In my case the issue was that I was clearing the username and password text fields after successful authentication before pushing my next view. Apple's heuristics seem to require the text fields with .username and .password content types to be populated when the view disappears.
I was having same problem. I did all the setup which recommended by Apple (https://developer.apple.com/documentation/security/password_autofill/about_the_password_autofill_workflow).I had few fields in between UserName and Password field on Signup Screen. But when I put Password field just next to UserName field then Apple popup to save password appearing.
I have the same problem, Because 3 textField in my viewController, usernameTextField,passwordTextField and authcodeTextField.Set passWordTextField.becomeFirstResponder() before release the controller, its work for me
I implemented AutoFill for stored username and password suggestion successfully in iOS 11.
I have two text fields in my login view controller, one for email, one for password. The content types are defined as follows:
email / username text field configuration
password text field configuration
This used to work just fine in iOS 11, but after upgrading my development iPad to iOS 12, the app suggests emails for the username field and the following happens when editing the password field:
In my create account view controller, I have 3 text fields: email, password, repeat password. Their content modes are setup as follows:
email → email address
password → new password, rule: minlength:8;
repeat password → new password, rule: minlength:8;
When editing the email address field, it properly suggests an email address. For the password and repeat password fields, however, it suggests stored passwords, instead of suggesting a new password.
What I tried
(illogically) flip the content mode setup, so the login password field is set to new password and the create account password fields are set to password
no success; in fact, no change of behavior at all
set content mode to none for login and create account fields so AutoFill can try to handle it automatically
no success; in fact, no change of behavior at all
Note
AutoFill is properly setup on the server. The stored passwords being suggested in the create account fields prove that
The functionality is still working on iOS 11 iPads
When logging in with a new username, the app will ask the user to add this username and password to Keychain, even on iOS 12
Any idea what I need to change so that stored username & password suggestion works in iOS 12 again?
Thanks!
Edit
As requested by #kralex below, here's my view hierarchy for the login view controller in the storyboard:
...and on the device:
Apple is doing some heuristic to make the best guess what you might need: autofill or a new password. However in some cases it might fail.
In your case the problem is related to the "Create Account Button". It makes the system think that it is a sign up form.
The easiest option to fix it: replace sign up UIButton with UILabel and add tapRecognizer to handle taps.
I had a similar issue and found out Apple's heuristics were tapping in to the class name of the view controller to determine whether to suggest a new password or use an existing one. It seems like even if I set the correct textContentType on my UITextFields, it still would use the name of the controller.
My UIViewController has both sign up and login on the same screen, but the controller is named RegistrationViewController. I changed it to LoginViewController to test, and found that the login portion started working, but the registration bit acted like it was login! Even with the correct textContentTypes set!
I wound up having to rename my UIViewController something that doesn't imply registration or login for it to actually respect my textContentTypes. It's awful. Truly awful.
I would imagine at least part of the reason this is/was happening to you is because the you have the word Welcome as the beginning of your view controller, unbelievable as it sounds.
By the way, I tried RegistrationLoginViewController (it chose the registration setup) and LoginRegistrationViewController (it chose the login setup), and neither worked. It has to avoid Apple's heuristics if you want to have both on the same controller.
In iOS 11 they have introduced password autofill which fills the username and password in iOS app like the same way it does in Safari, User goes to website first, logged in save the username and password in keychain and then open app were the fields are automatically populated, the username and password
can it be implemented in other ways, like I logged in the app first and then while going on the website through Safari it automatically fills the username and password?
Is there any documentation or articles regarding it?
Editing My Answer:
Looks like it is possible to do so. The same kind of association we can see in SharedWebCredentials which is released in iOS8. Using SharedWebCredentials doing in both ways is possible. From app to website and website to app. Assuming Password autofill in iOS11 has done on top of this.
Here is how the association will happen.
We have entitlement certificate for an app where we will provide domain to be linked with. Then we have a website where we will hold information in JSON format related to that website. In that JSON, you have to put your bundle identifier. So when the user saves this passwords and logs in through app. Then the app entitlement file will provide the web address to safari. Safari will bring that JSON file and validate the bundle identifier is same or not. If validation success it will populate username and password.
For more info: Password Autofill in iOS 11
I asked about this at the developer labs at WWDC and was informed that it's possible. The key is that the new password autofill is based on the existing Shared Web Credentials API, which works both ways. If you use that API to save credentials from your app, they'll be available in Mobile Safari. Shared Web Credentials was the topic of a 2014 WWDC session.
I haven't tried it yet, but based on the source I'm pretty confident that it should work.