diff --git a/persistence/sql/identity/persister_identity.go b/persistence/sql/identity/persister_identity.go index a2fb51a0d5ab..489b1fbb4360 100644 --- a/persistence/sql/identity/persister_identity.go +++ b/persistence/sql/identity/persister_identity.go @@ -755,7 +755,7 @@ func QueryForCredentials(con *pop.Connection, where ...Where) (credentialsPerIde ).LeftJoin(identifiersTableNameWithIndexHint(con), "identity_credential_identifiers.identity_credential_id = identity_credentials.id AND identity_credential_identifiers.nid = identity_credentials.nid", ).Order( - "identity_credentials.id ASC", + "identity_credential_identifiers.identifier ASC", ) for _, w := range where { q = q.Where("("+w.Condition+")", w.Args...) diff --git a/selfservice/hook/show_verification_ui.go b/selfservice/hook/show_verification_ui.go index 65a5935ec7a6..580292a26ccd 100644 --- a/selfservice/hook/show_verification_ui.go +++ b/selfservice/hook/show_verification_ui.go @@ -53,7 +53,7 @@ func (e *ShowVerificationUIHook) ExecutePostRegistrationPostPersistHook(_ http.R // ExecuteLoginPostHook adds redirect headers and status code if the request is a browser request. // If the request is not a browser request, this hook does nothing. func (e *ShowVerificationUIHook) ExecuteLoginPostHook(_ http.ResponseWriter, r *http.Request, _ node.UiNodeGroup, f *login.Flow, _ *session.Session) error { - return otelx.WithSpan(r.Context(), "selfservice.hook.ShowVerificationUIHook.ExecutePostRegistrationPostPersistHook", func(ctx context.Context) error { + return otelx.WithSpan(r.Context(), "selfservice.hook.ShowVerificationUIHook.ExecuteLoginPostHook", func(ctx context.Context) error { return e.execute(r.WithContext(ctx), f) }) }