-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client error: POST https://appleid.apple.com/auth/token
resulted in a 400 Bad Request
response: {"error":"invalid_client"}
#38
Comments
I am getting the same issue, did you have any luck resolving this? |
Yes I am getting this same issue , |
It is because, your client_secret token is expired, you need to generate a new token and replace it with old one, it will be fixed then. |
@iamaz007 I create new app and new client secret and update the existing configuration but its giving the same error |
you don't need to create new app in apple, just generate a new client_secret, make sure you have selected right algorithm it is "ES256" for apple JWT in code, after implementing new client_secret, clear your Laravel cache, to do this, simply go to boostrap/cache and delete all files from there except .gitIgnore |
Thanks I will try this |
@iamaz007 This is how , I am creating my client secret require 'jwt' key_file = 'key.txt' ecdsa_key = OpenSSL::PKey::EC.new IO.read key_file headers = { claims = { token = JWT.encode claims, ecdsa_key, 'ES256', headers |
I am also getting this error: I recreated my JWT token to make sure it was not expired and I made sure the ES256 algorithm was being used. Has anyone with this issue found a solution? Thank you in advance! Update: I tried validating my JWT token at https://jwt.io/ and it came up as an invalid signature. I'm not sure if this is what was causing the invalid_client error or not, but I was not able to resolve it. |
I ended up generating the client secret using
more info is here |
Plz, how to generate new client secret ? |
I have the following implementation in node, but I guess you can rewrite it pretty easy. It renews the token every second minute, and the token is valid according to www.jwt.io.
Hope that can help a bit! |
This library is so messy. I wasted days to make it work. I have the same issue, regenerated the key and everything but it's about how the return object is handled in this library. Author also doesn't seem to be active anymore, such a shame. |
True, there also has been some confusion as to this library being the one used in the socialite providers collection, which it is not. There is also a good chance that Apple's API has changes since this library was first created. As to the state of this library and my activity, I have not been using it myself in projects since I quit freelancing, so any help in form of PRs is greatly appreciated. |
regenerating the secret key worked for me. Strange how apple limits it to 6 months. |
I have configured all the configuration for apple signin. It is redirect to apple site to get username and password. after that in callback, it is showing like this
The text was updated successfully, but these errors were encountered: