diff --git a/pkg/usrmgr/usrmgr.go b/pkg/usrmgr/usrmgr.go index 8af71c41f..535dc0a86 100644 --- a/pkg/usrmgr/usrmgr.go +++ b/pkg/usrmgr/usrmgr.go @@ -246,9 +246,7 @@ func (s Service) GetSession( return &ErrSessionNotFound{message: "session not found"} } - // Check if session is expired if time.Now().After(session.ExpiredAt) { - // Delete expired session if err := coredata.DeleteSession(ctx, tx, sessionID); err != nil { return fmt.Errorf("cannot delete expired session: %w", err) }