diff --git a/api/src/Security/OIDCAuthenticator.php b/api/src/Security/OIDCAuthenticator.php index a3b6f1db5..8fbf5111d 100644 --- a/api/src/Security/OIDCAuthenticator.php +++ b/api/src/Security/OIDCAuthenticator.php @@ -128,7 +128,7 @@ public function authenticate(Request $request): PassportInterface if($doctrineUser instanceof User === false) { $doctrineUser = new User(); } - $doctrineUser->setName($result['name']); + $doctrineUser->setName($result['name'] ?? $result['sub']); $doctrineUser->setEmail($result['email']); $doctrineUser->setPassword(''); $doctrineUser->addApplication($this->applicationService->getApplication());