Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions githubauth/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ type TokenRequestAllRepos struct {
// AppToken creates a signed JWT to authenticate a GitHub app so that it can
// make API calls to GitHub.
func (g *App) AppToken() (string, error) {
// Make the current time 30 seconds in the past to combat clock skew issues
// Make the current time 60 seconds in the past to combat clock skew issues
// where the JWT we issue looks like it is coming from the future when it gets
// to GitHub
iat := time.Now().UTC().Add(-30 * time.Second)
iat := time.Now().UTC().Add(-60 * time.Second)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message you got was due to EXP being in the past, not due to iat being in the future.

At least that is how I read it

exp := iat.Add(5 * time.Minute)

b64Encode := base64.RawURLEncoding.EncodeToString
Expand Down
Loading