apple sign in server side issue, invalid_grant when exchanging authorization code obtained from ASAuthorizationAppleIDCredential on the server-side

Hi! I was trying to use apple sign in for our IOS application, but I got an issue. I can successfully use apple sign in in my app, and I get a token (authorizationCode) from sign in response. I have already set the server up, and can use it to validate tokens from web successfully. but when trying to validate tokens from IOS, I am getting

invalid grant_type
error message. I am validating token by using this documentation https://developer.apple.com/documentation/signinwithapplerestapi/generate_and_validate_tokens. can you please help?

Replies

Did you manage to figure this out? I'm currently getting the same invalid_grant error when trying to verify.

Did you fix the problem? We are having the same problem and we are out of ideas.

I ran into the same issue. It would be great if someone could share a solution how to solve the issue.

How did you manage to get a good authorizationCode?
I get NSData with 64 bytes of zeroes which doesn't seem to be valid.

Running into the same issue. invalid_grant -- anyone else resolve this?