I am using apple-signin-auth in my node js app.
I try to verify the IdToken as you can see here:
result = await appleSignin.verifyIdToken(token, {
audience: config.CLIENT_ID_APPLE,
ignoreExpiration: true, // ignore token expiry (never expires)
});
I want to ignoreExpiration of the token and CLIENT_ID_APPLE is correct. But I can see the following error in my logs.
JsonWebTokenError: error in secret or public key callback: input error: Invalid id token public key id at /app/node_modules/jsonwebtoken/verify.js:96:19 at _getIdTokenApplePublicKey (/app/node_modules/apple-signin-auth/lib/index.js:1:5730) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5)
A list for valid options for the appleSignin.verifyIdToken function is stated here.
When I test is locally it works to verify the idToken. But I only tested with a not expired token. Is it possible that the error message is misleading and it has something to do with the expiration of the token?