probot: Expiration time' claim ('exp') is too far in the future
Bug Report
Current Behavior
Following current getting started guide, that is finishing the Configuring a GitHub App, results in an application that throws 401 Unauthorized on a new issuewith the ERROR (HttpError): 'Expiration time' claim ('exp') is too far in the future error
I used the npx binary as per the documentation, and chose the basic-ts typescript template.
import { Application } from 'probot' // eslint-disable-line no-unused-vars
export = (app: Application) => {
app.on('issues.opened', async (context) => {
const issueComment = context.issue({ body: 'Thanks for opening this issue!' })
await context.github.issues.createComment(issueComment)
})
Environment
- Probot version(s): 10.9.5
- Node/npm version: v14.14.0/6.14.8
- OS: Fedora 32
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 20 (7 by maintainers)
I’m currently experiencing the same issue. The time of the servers runs a few seconds apart, but I get the expiration time error. Used Probot version is 12.1.0 and OS is RHEL7.
date && curl -I https://our.ghes-server.com | grep -Fi “date” Fri Jan 21 09:19:35 CET 2022 Date: Fri, 21 Jan 2022 08:18:52 GMT
As I understand the code I’ve seen so far, the authentication library tries to get a token with a validity of exactly 10 minutes into the future. However, Github only allows to retrieve tokens with a maximum expiration time of 10 minutes. If my local time is now AFTER the server time, the token will then always be requested outside the maximum permissible limit of 10 minutes - right?
I still have this in my backlog
Also having this same issue. Anything being done to resolve it?