Sign in with Apple invalid_client first time only

Hello, we implemented Apple Sign-In in our website long ago, and it worked well.

Recently we have found a strange behaviour.

The first time we make the request to the /auth/token endpoint we get an invalid_client error.

Our client id is com.spicysparks.service.id

If we make a request another time with exactly the same data it works fine.

We noticed we get this error only when we try a newly generated client secret for the first time.