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
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: