diff --git a/internal/session/store.go b/internal/session/store.go index 3a9627f..969d669 100644 --- a/internal/session/store.go +++ b/internal/session/store.go @@ -64,13 +64,14 @@ func (s *Store) New(r *http.Request, name string) (*sessions.Session, error) { if err != nil { return session, nil } + session.ID = c.Value err = s.load(r.Context(), session) if err == nil { session.IsNew = false } else if !errors.Is(err, ErrNotFound) { - return nil, errors.WithStack(err) + return session, errors.WithStack(err) } return session, nil