Login issue with socialiteproviders in laravel

Hi all, I create web app laravel with function login with apple. This is any my information app and packet what i'm use :

  • Laravel: 10.x
  • PHP: 8.1
  • Packages for login: https://socialiteproviders.com/

I'm done with API appleid.apple.com/auth/authorize for auth user with apple ID. Response below :

So next step i call to this API : https://appleid.apple.com/auth/token for verify token but response is below :

I'm try with postman but response is same that ( invalid_client ). Everything is correct( client_id, team_id, private_key ). I use https://jwt.io/#debugger for test verify token. Signature Verified is result.

Can help me for declare what is issue ? what client is invalid ? Thank you so much. P/s : Sorry for my poor English

Accepted Reply

I tried many ways with the Socialite Providers packet but it didn't work. I thought that the problem was probably in the JWT packet. It's not actually encrypted properly according to Apple's requirements. So I followed the step by step instructions by @Aaron Parecki. https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple I took the JWT key myself and automatically called Apple's API without going through a packet. It's working. Thank @Aaron Parecki

Replies

I tried many ways with the Socialite Providers packet but it didn't work. I thought that the problem was probably in the JWT packet. It's not actually encrypted properly according to Apple's requirements. So I followed the step by step instructions by @Aaron Parecki. https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple I took the JWT key myself and automatically called Apple's API without going through a packet. It's working. Thank @Aaron Parecki