Why does iOS Password Autofill not prompt to save password on keychain? - ios

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

Related

XAMARIN :: Strong password generation iOS not stored in keychain

In my xamarin application there is the option to create a user. Now that i have my associated domains setup properly, iOS prompts the user with the question if he wants to use a strong password for his account and to store it in his key chain. This is not build in the app, but some iOS feature. Now i have the problem that after registering with a strong password, the password is not save in the keychain nor does it prompt when the user want to login. Problem is, the user does not know its password and cannot login after he logged out. I have this on all iOS devices in testflight and in the live application.
What could be the problem, or can someone guide me in a direction where i could find an answer?
I tried to tinker with some custom code (see below) to fix the problem, or get the password stored in the keychain.
if (!NSUserDefaults.StandardUserDefaults.BoolForKey("FirstLaunch"))
{
// Delete the keychain items on first launch so after a reinstall the key is gone
// Tried all sorts of combination of securityRecords
var securityRecords = new[] {
SecKind.GenericPassword,
//SecKind.Certificate,
//SecKind.Identity,
SecKind.InternetPassword,
//SecKind.Key
};
foreach (var recordKind in securityRecords)
{
SecRecord query = new SecRecord(recordKind);
// For now as a test disable this. So we can check if keychain password gets stored again. Not sure if first launch bool get correctly stored
//SecKeyChain.Remove(query);
}
// Mark that the app is first launched
NSUserDefaults.StandardUserDefaults.SetBool(true, "FirstLaunch");
NSUserDefaults.StandardUserDefaults.Synchronize();
}
So:
I fill in registration the form in my app, username manually
Auto generate password and repeat password by iOS (this is not a xamarin function)
save user account
Problems:
Password is not stored in key
login form does not popup asking if i want to use stored keychain data (which makes sense, there is nothing there) Hope this makes more sense

How to provide an option to save username and password to iCloud Keychain on iOS in NativeScript Angular?

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

"iPhone created a strong password for this website" popup appearing when tapping on a secure text field

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

Password Autofill iOS 12 not working properly

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.

Password AutoFill for iOS App

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.

Resources