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.

JWT: 'Expiration time' claim ('exp') is too far in the future

See original GitHub issue

Bug Report

Current Behavior This error began when I upgraded to v9 from v7

When running probot run index.js I get the following error:

ERROR probot: 'Expiration time' claim ('exp') is too far in the future

I am not creating any tokens manually, this just occurs when the bot tries to authenticate in order to make the first request.

Expected behavior/code Authentication with the GitHub API on probot@^9 should create valid API tokens

Environment

  • Probot version(s): 9.2.13
  • Node/npm version: Node v10.16.0
  • OS: OSX 10.14.5

Possible Solution

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
warrenbuckleycommented, Jun 12, 2019

Hmm sounds like a game of spot the difference is in order then @gr2m

It’s not quite the same though

Previous

 exp: Math.floor(Date.now() / 1000) + 60,  // JWT expiration time

Current

const now = Math.floor(Date.now() / 1000);
exp: now + 60 * 10, // JWT expiration time (10 minute maximum)

So previous one just added on 60 seconds from current issued time and the current one adds on 10 minutes from current time.

4reactions
issue-label-bot[bot]commented, Jun 11, 2019

Issue-Label Bot is automatically applying the label bug 🐞 to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expiration time' claim ('exp') is too far in the future · Issue #1426
As I understand the code I've seen so far, the authentication library tries to get a token with a validity of exactly 10...
Read more >
GitHub API returns 401 while trying to generate access token
I'm trying to generate an access token for my GitHub App via GitHub API. I'm getting a 401 unauthorized response error: expiration time'...
Read more >
Managing JWT token expiration - Medium
The “exp” (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing.
Read more >
Expiration Time (exp) claim error in the ID token
The issue here was specific to user's local machine time. It was not synced with the world clock & hence it was 1...
Read more >
The client_assertion token has an expiration too far into the ...
I assume you are using our SDK to create the JWT token used in the client assertion? If so are you specifying either...
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