From 8894064e106220f67384b547920fa5e6197a20bb Mon Sep 17 00:00:00 2001 From: Stavros Date: Sat, 15 Nov 2025 11:47:57 +0200 Subject: [PATCH] chore: reset auth service to match upstream --- internal/service/auth_service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/auth_service.go b/internal/service/auth_service.go index 4de547c..bcba481 100644 --- a/internal/service/auth_service.go +++ b/internal/service/auth_service.go @@ -213,7 +213,7 @@ func (auth *AuthService) CreateSessionCookie(c *gin.Context, data *config.Sessio Provider: data.Provider, TOTPPending: data.TotpPending, OAuthGroups: data.OAuthGroups, - Expiry: time.Now().Add(time.Duration(expiry) * time.Second).UnixMilli(), + Expiry: time.Now().Add(time.Duration(expiry) * time.Second).Unix(), OAuthName: data.OAuthName, } @@ -263,7 +263,7 @@ func (auth *AuthService) GetSessionCookie(c *gin.Context) (config.SessionCookie, return config.SessionCookie{}, fmt.Errorf("session not found") } - currentTime := time.Now().UnixMilli() + currentTime := time.Now().Unix() if currentTime > session.Expiry { _, err = gorm.G[model.Session](auth.database).Where("uuid = ?", cookie).Delete(auth.ctx)