Conditions under which a JWT client token expires

In order to use Sign in with Apple, I issued a JWT client according to the instructions and was able to connect without any problems, but suddenly an INVALID_CLIENT error started to occur.

The error was resolved by re-obtaining the JWT client token and resetting it.

The validity period of the JWT client token is 6 months and it has not expired yet, but I would like to know why I am getting an INVALID_CLIENT error.

Hi @yujid,

For us to begin investigating any issue with Sign in with Apple, we need more information from you. Please see the following post:

Gathering required information for troubleshooting Sign in with Apple authorization and token requests https://developer.apple.com/forums/thread/762831

However, the server logs are periodically purged, so you would need to have reproduced the issue recently in order for us to compare logs.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Adding this for future readers: the client secret JWT has a hard maximum lifetime of 6 months (exp − iat ≤ 15777000 seconds), and it expires without any warning — web sign-in just starts returning invalid_client. If you rely on a statically generated secret, it needs to be regenerated at least every 6 months. This can be automated in CI (I maintain an open-source GitHub Action that does this on a schedule: github.com/oskar-makarov/apple-client-secret-rotator), or generate it dynamically server-side if your framework supports it.

Conditions under which a JWT client token expires
 
 
Q