mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
fix: set correct username / preferred login name after idp callback (#2189)
This commit is contained in:
parent
1e2c1a4f04
commit
490d087d45
@ -592,7 +592,11 @@ func (repo *AuthRequestRepo) checkExternalUserLogin(ctx context.Context, request
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
request.SetUserInfo(user.ID, user.UserName, user.PreferredLoginName, user.DisplayName, user.AvatarKey, user.ResourceOwner)
|
||||
username := user.UserName
|
||||
if request.RequestedOrgID == "" {
|
||||
username = user.PreferredLoginName
|
||||
}
|
||||
request.SetUserInfo(user.ID, username, user.PreferredLoginName, user.DisplayName, user.AvatarKey, user.ResourceOwner)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user