From b2d7352a5ac95952c7c099a295624d7078869647 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Wed, 20 Mar 2024 15:02:57 +0100 Subject: [PATCH] fix(login): display username after registration with idp (#7598) It was noticed multiple time (incl. customers) that the loginname is sometimes not rendered in the UI. This PR fixes such an issue after registration of a new user from an IdP. --- .../auth/repository/eventsourcing/eventstore/auth_request.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/auth/repository/eventsourcing/eventstore/auth_request.go b/internal/auth/repository/eventsourcing/eventstore/auth_request.go index 7dec242792..1f65bc42fd 100644 --- a/internal/auth/repository/eventsourcing/eventstore/auth_request.go +++ b/internal/auth/repository/eventsourcing/eventstore/auth_request.go @@ -567,8 +567,7 @@ func (repo *AuthRequestRepo) AutoRegisterExternalUser(ctx context.Context, regis if err != nil { return err } - request.UserID = human.AggregateID - request.UserOrgID = human.ResourceOwner + request.SetUserInfo(human.AggregateID, human.Username, human.PreferredLoginName, human.DisplayName, "", human.ResourceOwner) request.SelectedIDPConfigID = externalIDP.IDPConfigID request.LinkingUsers = nil err = repo.Command.UserIDPLoginChecked(ctx, request.UserOrgID, request.UserID, request.WithCurrentInfo(info))