The Sign in with Apple authorizationCode is null when using the password request too

Originator:revoltes666
Number:rdar://FB9718512 Date Originated:Oct 22, 2021 at 9:22 AM
Status:Open Resolved:No
Product:Other Product Version:
Classification: Reproducible:
 
If you use

```swift
let requests = [ASAuthorizationAppleIDProvider().createRequest()]

let authorizationController = ASAuthorizationController(authorizationRequests: requests)
authorizationController.delegate = self
authorizationController.presentationContextProvider = self
authorizationController.performRequests()
```

and sign in, the delegate is called with an `ASAuthorizationAppleIDCredential` object with a nonnull `authorizationCode`, every time.

But if you use

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

let authorizationController = ASAuthorizationController(authorizationRequests: requests)
authorizationController.delegate = self
authorizationController.presentationContextProvider = self
authorizationController.performRequests()
```

instead, and sign in with the Apple ID account, and not one of the password ones, the delegate is called with `ASAuthorizationAppleIDCredential` object that has a null `authorizationCode`.

This was introduced in iOS 15; it worked correctly before.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!