diff --git a/internal/command/project_application_oidc.go b/internal/command/project_application_oidc.go index 68f64345aa..540c69eea0 100644 --- a/internal/command/project_application_oidc.go +++ b/internal/command/project_application_oidc.go @@ -170,7 +170,10 @@ func (c *Commands) ChangeOIDCApplicationSecret(ctx context.Context, projectID, a return result, err } -func (c *Commands) VerifyOIDCClientSecret(ctx context.Context, projectID, appID, secret string) error { +func (c *Commands) VerifyOIDCClientSecret(ctx context.Context, projectID, appID, secret string) (err error) { + ctx, span := tracing.NewSpan(ctx) + defer func() { span.EndWithError(err) }() + app, err := c.getOIDCAppWriteModel(ctx, projectID, appID, "") if err != nil { return err diff --git a/internal/user/repository/view/model/user_session.go b/internal/user/repository/view/model/user_session.go index 541b7eff45..747dc552a7 100644 --- a/internal/user/repository/view/model/user_session.go +++ b/internal/user/repository/view/model/user_session.go @@ -120,8 +120,7 @@ func (v *UserSessionView) AppendEvent(event *models.Event) error { if v.UserAgentID != data.UserAgentID { v.PasswordVerification = time.Time{} } - case es_model.MFAOTPVerified, - es_model.HumanMFAOTPVerified: + case es_model.HumanMFAOTPVerified: data := new(es_model.OTPVerified) err := data.SetData(event) if err != nil { diff --git a/internal/user/repository/view/model/user_session_test.go b/internal/user/repository/view/model/user_session_test.go index 10ccb0646e..7b9270e1a2 100644 --- a/internal/user/repository/view/model/user_session_test.go +++ b/internal/user/repository/view/model/user_session_test.go @@ -119,7 +119,7 @@ func TestAppendEvent(t *testing.T) { args: args{ event: &es_models.Event{ CreationDate: now(), - Type: es_model.MFAOTPVerified, + Type: es_model.HumanMFAOTPVerified, Data: nil, }, userView: &UserSessionView{UserAgentID: "id"}, @@ -131,7 +131,7 @@ func TestAppendEvent(t *testing.T) { args: args{ event: &es_models.Event{ CreationDate: now(), - Type: es_model.MFAOTPVerified, + Type: es_model.HumanMFAOTPVerified, Data: func() []byte { d, _ := json.Marshal(&es_model.OTPVerified{ UserAgentID: "id",