From 8b26aa36289fdc8be4fb06c2243f8ab3f2cb7e31 Mon Sep 17 00:00:00 2001 From: Angel Beltran Date: Mon, 5 Jan 2026 14:11:18 -0700 Subject: [PATCH] updated id token lifetime --- internal/site/auth.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/site/auth.go b/internal/site/auth.go index 3dca43a..603f63a 100644 --- a/internal/site/auth.go +++ b/internal/site/auth.go @@ -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)