Is it possible to access the iOS Keychain and get stored passwords to autocomplete fields?
Asked Answered
J

3

5

Is it possible to access saved passwords that a user has submitted in Safari from the iOS keychain?

https://developer.apple.com/documentation/security/keychain_services

I would like to use it to perform an autocomplete on certain fields.

Joubert answered 8/9, 2011 at 20:1 Comment(1)
I certainly hope not. From a security standpoint, that'd be ridiculous.Monofilament
P
2

No, it is not possible.

App could have access only to its own keychain and for shared between your other apps keychains.

Polarization answered 8/9, 2011 at 20:8 Comment(0)
C
10

This is now possible in iOS 8.

This was introduced at WWDC 2014 in a session called "Your App, Your Website, and Safari"

Or, see this post on how to do this in Swift.

In short, the web domain SSL certificate has to be certified by your iOS app (which must have the associated-domains capability). When the two credentials match, you can use SecRequestSharedWebCredential to retrieve existing username/password pairs, or SecAddSharedWebCredential to add new ones or update existing ones.

Edit: Apple has released documentation on how to do this in Objective-C or Swift here

Cementation answered 16/1, 2015 at 0:1 Comment(0)
P
2

No, it is not possible.

App could have access only to its own keychain and for shared between your other apps keychains.

Polarization answered 8/9, 2011 at 20:8 Comment(0)
S
0

See WWDC 2017 session to know more about Password AutoFill for Apps. If you have logged in earlier through Safari and saved your password and the same password if you wish to use in your app, you click on password textfield. This action will wake a keyboard which will show key symbol. This signifies to you password as an autofill from list of passwords saved in keychain through safari. So click on key symbol, after authentication you will get to view all your saved passwords in Autofill Password List.

Note: Before moving to Autofill Password List you have to authenticate your phone by local authentication using your saved touchID.

Snelling answered 10/6, 2017 at 9:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.