Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GaxiosError: Failed to retrieve verification certificates: request to https://www.googleapis.com/oauth2/v1/certs failed #1769

Closed
sanjacob opened this issue Mar 7, 2024 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@sanjacob
Copy link

sanjacob commented Mar 7, 2024

Today out of the blue my login endpoint stopped working, and it seemingly never returned.
After a few minutes of debugging, I realised the verifyIdToken method was still running.
For some reason, the library tries to fetch certificates without any sort of warning or timeout for this, assuming the server will always be able to respond.

Then, I finally got this error:

GaxiosError: Failed to retrieve verification certificates: request to https://www.googleapis.com/oauth2/v1/certs failed

It is pretty much the same as googleapis/google-api-nodejs-client#3028.

I don't think it would be that hard to set a timeout on things like this, but maybe there's a reason for it? Who knows

Environment details

  • OS:
  • Node.js version:
  • npm version:
  • google-auth-library version: 9.6.3

Steps to reproduce

  1. Call client.verifyIdToken()

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@sanjacob sanjacob added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 7, 2024
@danielbankhead
Copy link
Contributor

Actively working on this here:

@danielbankhead danielbankhead closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
@jaybe78
Copy link

jaybe78 commented Oct 10, 2024

Is there any news on this ?

My signin google feature suddenly stopped working with error

'Error: Failed to retrieve verification certificates: request to https://www.googleapis.com/oauth2/v1/certs failed, reason: certificate has expired\n' +
users        |     '    at Gaxios._request (/app/node_modules/gaxios/src/gaxios.ts:157:13)\n' +
users        |     '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
users        |     '    at async JWT.getFederatedSignonCertsAsync (/app/node_modules/google-auth-library/build/src/auth/oauth2client.js:567:19)\n' +
users        |     '    at async JWT.verifyIdTokenAsync (/app/node_modules/google-auth-library/build/src/auth/oauth2client.js:507:26)\n' +

I have a flutter app that sends the idtoken to the backend for verification.
It used to work until this morning

const client = auth.fromAPIKey(GOOGLE_CLIENT_ID);
const loginTicket = await client.verifyIdToken({ idToken });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants