Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

370
Views
node js verify JWT error apple-signin-auth package: Invalid id token public key id

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!