There are two issues with signIn with apple which this CR is fixing:
credential.getIdentityToken() returns an object of NSData and using toString() converts it to a string which is not a valid IdToken which causes an error unable to parse ID Token
Fix: Converted it to String using byte data, and correct UTF encoding same as the ref mentioned above.
With the above fix, there was issue in validating the nonce, as we are sending sha256 of nonce in request and the same in validation. But instead of sha256 we need to pass the raw nonce so the validation is done correctly.
ref: https://firebase.google.com/docs/auth/ios/apple#objective-c_3
There are two issues with signIn with apple which this CR is fixing:
NSData
and using toString() converts it to a string which is not a valid IdToken which causes an errorunable to parse ID Token
Fix: Converted it to String using byte data, and correct UTF encoding same as the ref mentioned above.
Fix: Passed raw nonce in delegate
Testing: