summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-07 11:20:32 -0700
committermo khan <mo@mokhan.ca>2025-05-07 11:20:32 -0700
commit33234f9ca76d7fe44c87c56019a5dc9378b6a532 (patch)
tree06e0e6536e89c89fe9fa7a54c1cde22222a9e2b8 /app
parent30d95f0cb026c13a34e138a7263c5ae6096400d6 (diff)
chore: log the expiration of the access token
Diffstat (limited to 'app')
-rw-r--r--app/controllers/sessions/controller.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/sessions/controller.go b/app/controllers/sessions/controller.go
index 564c92d..91f2f47 100644
--- a/app/controllers/sessions/controller.go
+++ b/app/controllers/sessions/controller.go
@@ -143,10 +143,14 @@ func (c *Controller) Create(w http.ResponseWriter, r *http.Request) {
ck := web.NewCookie(
"session",
encoded,
- cookie.WithExpiration(tokens.Expiry),
cookie.WithSameSite(http.SameSiteLaxMode),
+ cookie.WithExpiration(tokens.Expiry),
)
- log.WithFields(r.Context(), log.Fields{"cookie": ck})
+ log.WithFields(r.Context(), log.Fields{
+ "cookie": ck,
+ "expiry": tokens.Expiry,
+ "now": time.Now(),
+ })
cookie.Write(w, ck)
http.Redirect(w, r, "/dashboard", http.StatusFound)
}