question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It generates token with life duration = 1 hour

See original GitHub issue

I’ve created “Credentials.json” file as per instructions. Then I am running the command to generate Token: node ..\..\node_modules\gmail-tester\init.js .\credentials.json gmail_token.json test@gmail.com It successfully creates Token, BUT it’s life time is just 1 hour.

{
  "access_token": "ya29.a0AfH6SMDwy2 ... xMze5YfDMru-CYaM",
  "refresh_token": "1//09boFIYyEL0w3Cg ... UKq7eNZHeSKxIv3MyZqI",
  "scope": "https://www.googleapis.com/auth/gmail.readonly",
  "token_type": "Bearer",
  "expiry_date": 1610372897000
}

How extend token life time (to at least half of the year)?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
levz0rcommented, Dec 13, 2020

According to this, it looks like the access token is now expiring after one hour. I’ll expose a function to refresh the access token in the coming days.

Thank you for bringing this to my attention.

1reaction
levz0rcommented, Jan 9, 2021

Can you guys please confirm the new method solves the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configurable token lifetimes - Microsoft Entra
ID tokens, SAML2 tokens: 1 hour. Minimum: 10 minutes; Maximum: 1 day. Refresh and session token lifetime policy properties. Refresh and session ...
Read more >
Can I request a token with a lifespan shorter than 1 hour?
Yes, you can configure your Azure Active Directory token lifetime minimum 10 minutes. You could use following power-shell command to create ...
Read more >
Update Access Token Lifetime - Auth0
Locate the Token Expiration (Seconds) field, and enter the appropriate access token lifetime (in seconds) for the API. Default value is 86,400 seconds...
Read more >
Access Token Lifetime - OAuth 2.0 Simplified
Typically services using this method will issue access tokens that last anywhere from several hours to a couple weeks. When the service issues ......
Read more >
Token types | Authentication - Google Cloud
generateIdToken method to generate an access token for a service account with a lifetime of up to 12 hours. You can't create access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found