-
-
Notifications
You must be signed in to change notification settings - Fork 954
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: emit SelfServiceMethodUsed in SettingsSucceeded event #4056
fix: emit SelfServiceMethodUsed in SettingsSucceeded event #4056
Conversation
selfservice/flow/settings/hook.go
Outdated
@@ -282,7 +282,8 @@ func (e *HookExecutor) PostSettingsHook(w http.ResponseWriter, r *http.Request, | |||
WithField("flow_method", settingsType). | |||
Debug("Completed all PostSettingsPrePersistHooks and PostSettingsPostPersistHooks.") | |||
|
|||
trace.SpanFromContext(r.Context()).AddEvent(events.NewSettingsSucceeded(r.Context(), i.ID, string(ctxUpdate.Flow.Type), ctxUpdate.Flow.Active.String())) | |||
trace.SpanFromContext(r.Context()).AddEvent(events.NewSettingsSucceeded( | |||
r.Context(), i.ID, string(ctxUpdate.Flow.Type), ctxUpdate.Session.AMR)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't ctxUpdate.Session.AMR
the method used to authenticate the session?
I would expect that field to contain "profile"
, "password"
, etc. depending on which group the user updated in the settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is the method used in the session. Should it be the group that got updated? Maybe that makes more sense, but it is not clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it should be.
3fb644d
to
99955fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4056 +/- ##
==========================================
- Coverage 78.35% 78.34% -0.02%
==========================================
Files 370 370
Lines 26128 26129 +1
==========================================
- Hits 20473 20470 -3
- Misses 4094 4096 +2
- Partials 1561 1563 +2 ☔ View full report in Codecov by Sentry. |
This PR fixes the SelfServiceMethodUsed attribute in the SettingsSucceeded event, which previously was always empty.
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments