From bb30f541ccfa54948540627e58ebcbfd93875cb2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 19 Feb 2024 14:15:09 +0100 Subject: [PATCH] Bump access token expiration --- entity.go | 7 +++++-- diff --git a/entity.go b/entity.go index 400bd46b0dfe44630e0c2ab8ed772776fe8e66eb..4955fd6871a769d279a9ef0a1a1b223d18551a76 100644 --- a/entity.go +++ b/entity.go @@ -15,7 +15,10 @@ "golang.org/x/crypto/bcrypt" ) -const authCodeExpiration = 10 * time.Minute +const ( + accessTokenExpiration = 30 * 24 * time.Hour + authCodeExpiration = 10 * time.Minute +) type entity interface { columns() map[string]interface{} @@ -193,7 +196,7 @@ return "", fmt.Errorf("failed to generate access token secret: %v", err) } token.Hash = hash token.IssuedAt = time.Now() - token.ExpiresAt = time.Now().Add(2 * time.Hour) + token.ExpiresAt = time.Now().Add(accessTokenExpiration) return secret, nil } -- 2.48.1