Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove duplicate SessionIssued event #3351

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions session/manager_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"net/url"
"time"

"go.opentelemetry.io/otel/trace"

"github.com/ory/kratos/x/events"

"github.com/ory/kratos/selfservice/flow"
"github.com/ory/kratos/selfservice/sessiontokenexchange"
"github.com/ory/kratos/ui/node"
Expand Down Expand Up @@ -69,7 +65,7 @@
ctx, span := s.r.Tracer(ctx).Tracer().Start(ctx, "sessions.ManagerHTTP.UpsertAndIssueCookie")
defer otelx.End(span, &err)

isNew := ss.ID == uuid.Nil

Check failure on line 68 in session/manager_http.go

View workflow job for this annotation

GitHub Actions / Run Playwright end-to-end tests (cockroach)

isNew declared but not used
if err := s.r.SessionPersister().UpsertSession(ctx, ss); err != nil {
return err
}
Expand All @@ -78,12 +74,6 @@
return err
}

var event = events.NewSessionChanged
if isNew {
event = events.NewSessionIssued
}

trace.SpanFromContext(r.Context()).AddEvent(event(r.Context(), string(ss.AuthenticatorAssuranceLevel), ss.ID, ss.IdentityID))
return nil
}

Expand Down