Gargoyle
Gargoyle

Reputation: 10375

ASPasswordCredential - from where?

When using Sign in with Apple there's an ASPasswordCredential option which will pull the password from the iCloud keychain. I can't find details though on "where" in the keychain you store things. i.e. how do I know what keys to store the user or password details under.

Upvotes: 17

Views: 3383

Answers (2)

Rajan Maheshwari
Rajan Maheshwari

Reputation: 14571

One crucial step to make things autofill is to add the webcredentials settings in your Apple App Site Association file. Otherwise, you will always receive the "No Credentials available for login" error.

If you do not add there and you do not add the associated-domains in your application, you will never receive autofill specific user ID passwords and accounts for ASPasswordCredential specific to that application or domain.

This will also help in preventing duplicate account creation.

I have made a video explaining how we can use ASPasswordCredential. You can have a look! Understanding ASAuthorizationAppleIDCredential and ASPasswordCredential

Upvotes: 0

AlKir
AlKir

Reputation: 63

It seems to be connected with Password Auto Fill, which is available since iOS 12 (see section Password-Based Login inside https://developer.apple.com/documentation/authenticationservices). So if your app already has this functionality you could associate existing users with their new Apple ID accounts.

Upvotes: 2

Related Questions