Skip to content
Snippets Groups Projects
Commit b28098dd authored by Happy2C0de's avatar Happy2C0de
Browse files

Revert querying preferrredUsernameKey

parent 1608b473
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment