Revert querying preferrredUsernameKey
Signed-off-by: Happy2C0de <46957159+Happy2C0de@users.noreply.github.com>
This commit is contained in:
parent
1608b473eb
commit
b28098dde8
1 changed files with 2 additions and 4 deletions
|
@ -295,11 +295,9 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I
|
|||
return identity, fmt.Errorf("missing \"%s\" claim", userNameKey)
|
||||
}
|
||||
|
||||
prefUsername := "preferred_username"
|
||||
preferredUsername, found := claims[prefUsername].(string)
|
||||
preferredUsername, found := claims["preferred_username"].(string)
|
||||
if (!found || c.overrideClaimMapping) && c.preferredUsernameKey != "" {
|
||||
prefUsername = c.preferredUsernameKey
|
||||
preferredUsername, _ = claims[prefUsername].(string)
|
||||
preferredUsername, _ = claims[c.preferredUsernameKey].(string)
|
||||
}
|
||||
|
||||
hasEmailScope := false
|
||||
|
|
Reference in a new issue