Comments (5)
In your case, how old was a "really old token"? I'm getting this error with an id token that was about 2 days old. Guess I'm not really sure how long they are supposed to last. The error did go away when I generated a new id token (signed out/signed back in) and used that with veryifyIdToken.
from google-auth-library-nodejs.
I don't recall right now, but I think that if you try to use a token that it's a day old you should get this error.
from google-auth-library-nodejs.
In the same verifyIdToken call, I'm now getting errors like "Token used too late, 1449031980.079 > 1449029024". I'm not sure if there is some variability in what gets returned from Google's servers, or if some change occurred to those servers.
I think these numbers are referring to the "exp" field of the IdToken, which has the definition:
"The time the ID token expires, represented in Unix time (integer seconds)."
(https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo)
I'll have to see if I can get the IdToken exp field immediately after obtaining the IdToken and convert the Unix time to a h/m/s time.
from google-auth-library-nodejs.
That is the expected behavior. If a token has expired, then you'll recieve that error. The issue that I'm describing is when instead of getting the correct error (Token userd too late) the pemVerify.verify
call throws an error.
from google-auth-library-nodejs.
That error is to be expected if the token actually expired (You should check the expires_in
field if there is any in your response). The issue I'm describing is that instead of getting the correct error (Token used too late) the perVerify.verify
call throws an error due to the issue explained above.
If you're getting "Token used too late" you should refresh your access tokens.
from google-auth-library-nodejs.
Related Issues (20)
- Use ENVAR for service account impersonation
- Occasional timeout when requesting Google ID Token Verify HOT 2
- Allow passing in AWS credentials instead of only using environment variables HOT 2
- Type definitions in google-auth-library >= 9.5.0 incompatible with client libraries HOT 3
- GaxiosError: Failed to retrieve verification certificates: request to https://www.googleapis.com/oauth2/v1/certs failed HOT 1
- refactor!: Move Base `AuthClient` Types to `authclient.ts` HOT 2
- samples for external-account: should acquire ADC for url-sourced creds failed HOT 2
- samples for external-account: should acquire ADC for AWS creds failed HOT 2
- Client args type error for GCP HOT 4
- samples for external-account: should acquire ADC for file-sourced creds failed HOT 2
- Facing timeout issue for https://www.googleapis.com/oauth2/v4/token while generating oauth access token using google-auth-library HOT 7
- Ht
- G
- How to handle google auth with react and node js api HOT 1
- How to use nodejs api of google auth in axios fetch? HOT 3
- ToC for Reference Documentation is broken HOT 1
- error: FetchError: request to https://www.googleapis.com/oauth2/v1/certs failed, reason: connect ETIMEDOUT 142.251.43.10:443 HOT 1
- error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.160.74:443 HOT 1
- use getToken error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.160.74:443
- exchanging code for tokens: GaxiosError: request to https://oauth2.googleapis.com/token failed,
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-auth-library-nodejs.