Understanding ASAuthorizationPasswordProvider

Viewed 820

Working with sign in with Apple and in their sample code they have:

let requests = [ASAuthorizationAppleIDProvider().createRequest(),
                ASAuthorizationPasswordProvider().createRequest()]

And I am confused understanding the difference between them, and also the impact on trying to use both of them.

Am I right in saying that ASAuthorizationAppleIDProvider.createRequest() is a request for using Sign in with Apple and ASAuthorizationPasswordProvider().createRequest() is a request for using a username and password that may already be stored to the keychain?

Then, if I create an ASAuthorizationController with the previous requests as follows:

let authorizationController = ASAuthorizationController(authorizationRequests: requests)

if one fails, is it correct to say that they both fail?

So for this scenario, if my app does not have any previous credentials saved with the keychain, and I make those two requests the second one will fail because I don't have anything saved? I'm pretty confused as to why to use the two requests.

0 Answers
Related