Unable to exchange token with Auth0 after Apple Sign In

I followed below approach but in Xamarin to achieve apple sign in.

But i am not able to get the exchange token from Auth0 after getting the Authorization token from Apple.
Followed below links for the same:

i am getting this below error in response:
{“error”:“invalid_grant”,“error_description”:“Invalid authorization code”}

Could anyone help me to resolve this issue.

Thank you

1 Like

Could anyone help me in this regards.

You’ve probably passing data to /oauth/token endpoint wrong, take attention to content-type it should be x-www-formurlencoded, not a json.

I personally have passed this, but struggling with error from apple

@Knight704 when i am passing x-www-formurlencoded i receive a 401 error, when i don’t pass it i receive a 403 error. any ideas? Nobody answers me from auth0

2 Likes

I have the same problem. I think there is a problem with the authorizationCode from Apple.
In this document Add Sign In with Apple to Native iOS Apps the step 3 does not work.
When I see the /oauth/token endpoint documentation: Authentication API Explorer the code parameter is the value obtained from the call to the /authorize endpoint (Authentication API Explorer). But the authorize endpoint trigger the web based authorization (Universal Authorization).
So the problem is how to get the proper code from /authorize endpoint without triggering the web authorization or how to configure the Apple Sign In in the Auth0 settings to accept the Apple authorizationCode.