mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-12-24 17:12:30 +00:00
refactor: use current time to set new expiry
This commit is contained in:
@@ -244,7 +244,7 @@ func (auth *AuthService) RefreshSessionCookie(c *gin.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
newExpiry := session.Expiry + int64(time.Hour.Seconds())
|
||||
newExpiry := currentTime + int64(time.Hour.Seconds())
|
||||
|
||||
_, err = gorm.G[model.Session](auth.database).Where("uuid = ?", cookie).Updates(c, model.Session{
|
||||
Expiry: newExpiry,
|
||||
|
||||
Reference in New Issue
Block a user