updated id token lifetime

This commit is contained in:
2026-01-05 14:11:18 -07:00
parent 8ccc795812
commit 8b26aa3628
+3 -2
View File
@@ -110,8 +110,9 @@ func (s *Server) authenticateAndAddIdentity(f response.HandlerFunc, assertions .
// refresh tokens, when the access token is "old enough"
const idTokenLifetime = 10 * time.Hour
if refreshFloor := expiration.Add(-idTokenLifetime); refreshFloor.Before(now) {
// id token lifetime is 48 hours, allowing a person to use the app everyday comfortably, with wiggle room, without having to log in.
const idTokenLifetime = 48 * time.Hour
if refreshFloor := expiration.Add(-(idTokenLifetime / 4)); refreshFloor.Before(now) {
accessToken, expiration, err = s.auth.RefreshAccessToken(ctx, accessToken)
if err != nil {
fmt.Println("failed to refresh access token:", err)