ASPasswordCredential - What are the keys?

I'm watching the Sign in with Apple tutorial over and over, and looking at the Juice sample app, and I'm just not seeing where ASPasswordCredential comes into play. I understand it's called via ASAuthorizationPasswordProvider but where is it getting the username and password from? They generically say "icloud keychain".


With a keychain item you generally have a service, account, and optional access group. How do I know what to set those three things to so that Apple knows exactly what is my username and what is my password?

One crucial step to make things autofill and to use ASPasswordCredential 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

https://www.youtube.com/watch?v=qD4e5YR8R6s

ASPasswordCredential - What are the keys?
 
 
Q