Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Password AutoFill for iOS App

Tags:

ios

swift

ios11

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?

like image 329
Abdul Karim Avatar asked Jul 11 '17 11:07

Abdul Karim


People also ask

Does iOS have a password generator?

Like previous versions of Apple's mobile software, iOS 16 is able to automatically generate strong passwords for app and website logins, but now you can also edit them, and even generate passwords with no special characters.


2 Answers

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

like image 130
Sivajee Battina Avatar answered Sep 22 '22 05:09

Sivajee Battina


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.

like image 35
Tom Harrington Avatar answered Sep 20 '22 05:09

Tom Harrington