diff --git a/src/Provider/KeycloakResourceOwner.php b/src/Provider/KeycloakResourceOwner.php index 7587af7..22d98af 100644 --- a/src/Provider/KeycloakResourceOwner.php +++ b/src/Provider/KeycloakResourceOwner.php @@ -50,7 +50,7 @@ public function getEmail() */ public function getName() { - return \array_key_exists('name', $this->response) ? $this->response['name'] : null; + return \array_key_exists('preferred_username', $this->response) ? $this->response['preferred_username'] : null; } /**