Search code examples
iosoauthsigningapple-id

New Apple ID Sign In invalid grant issue


So far I followed this post and it helped me so much, however, I now get a "invalid_grant". Following : https://developer.apple.com/documentation/signinwithapplerestapi/errorresponse I understand that I have an issue either because of the authorization grant or refresh token is invalid.

In despite of my searches and tries (and retries), I am still stuck and I don't know where does it come from. I used the app given at https://developer.apple.com/documentation/authenticationservices/adding_the_sign_in_with_apple_flow_to_your_app

Now that I get my token from the app above, I try to validate it from C# backend but I get a 400 response code invalid_grant.

The only difference I could notice from the post is that I don't have any [Verify] button (option) or [Download] button from the portal compared to the image below. I don't know if this is related but I am trying to provide as much details as I can:

enter image description here


Hopefully someone can help, thanks for any help :) feel free to ask for more details if required

Max


Solution

  • I also had the same issue, I found the solution here:

    https://forums.developer.apple.com/thread/118135

    as explained in the link, when you are using the code you got from the app, you should use app id instead of service id.