From 917b595eaa4f2b882875197a99f8c4e3bfaccee1 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 8 Nov 2023 17:50:43 -0700 Subject: [PATCH] add nice window for token gen --- pkg/utils/tokengen.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/utils/tokengen.go b/pkg/utils/tokengen.go index ba1a38a..190b6be 100644 --- a/pkg/utils/tokengen.go +++ b/pkg/utils/tokengen.go @@ -18,8 +18,8 @@ func GetToken() (string, error) { } builder := jwt.NewBuilder() builder.Issuer("github.com/therealpaulgg/ssh-sync") - builder.IssuedAt(time.Now()) - builder.Expiration(time.Now().Add(time.Minute)) + builder.IssuedAt(time.Now().Add(-1 * time.Minute)) + builder.Expiration(time.Now().Add(2 * time.Minute)) builder.Claim("username", profile.Username) builder.Claim("machine", profile.MachineName) tok, err := builder.Build()