Skip to content

Commit bc92b12

Browse files
authored
Merge pull request #3592 from ActiveState/mitchell/dx-3151
Add a bit of lag to the JWT renewal time.
2 parents 72c594e + e862c58 commit bc92b12

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/platform/authentication/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ type ErrTokenRequired struct{ *locale.LocalizedError }
3737
var errNotYetGranted = locale.NewInputError("err_auth_device_noauth")
3838

3939
// jwtLifetime is the lifetime of the JWT. This is defined by the API, but the API doesn't communicate this.
40-
// We drop a minute from this to avoid race conditions with the API.
41-
const jwtLifetime = (1 * time.Hour) - (1 * time.Minute)
40+
// We drop 10 minutes from this to be on the safe side and avoid race conditions with the API.
41+
const jwtLifetime = (1 * time.Hour) - (10 * time.Minute)
4242

4343
// Auth is the base structure used to record the authenticated state
4444
type Auth struct {

0 commit comments

Comments
 (0)