Apple Sign-In Breaks Every 6 Months Due to Expiring JWT Client Secret
Developers using Sign in with Apple on the web may find authentication suddenly failing with an 'invalid_client' error approximately six months after setup, caused by Apple's mandatory expiry limit on JWT client secrets. Unlike other OAuth providers such as Google or GitHub, Apple requires developers to manually generate a time-limited JWT signed with a private .p8 key, which expires after a maximum of roughly 15.7 million seconds. Apple sends no warning when the secret expires, meaning users typically encounter the failure before developers do. The standard fix involves generating a fresh JWT and updating it in the authentication provider's dashboard, but this must be repeated every six months. To automate the process, a GitHub Action called apple-client-secret-rotator has been released, which regenerates and updates the secret on a scheduled basis, eliminating the need for manual intervention.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in