diff --git a/internal/auth/agent/jwt.go b/internal/auth/agent/jwt.go index b209d40..7ceefe4 100644 --- a/internal/auth/agent/jwt.go +++ b/internal/auth/agent/jwt.go @@ -18,7 +18,7 @@ func GenerateToken(key jwk.Key, thumbprint string) (string, error) { return "", errors.WithStack(err) } - now := time.Now() + now := time.Now().UTC() if err := token.Set(jwt.NotBeforeKey, now); err != nil { return "", errors.WithStack(err) diff --git a/internal/auth/thirdparty/jwt.go b/internal/auth/thirdparty/jwt.go index 2bea305..42ba931 100644 --- a/internal/auth/thirdparty/jwt.go +++ b/internal/auth/thirdparty/jwt.go @@ -42,7 +42,7 @@ func GenerateToken(ctx context.Context, key jwk.Key, issuer, subject string, rol return "", errors.WithStack(err) } - now := time.Now() + now := time.Now().UTC() if err := token.Set(jwt.NotBeforeKey, now); err != nil { return "", errors.WithStack(err)