Open DRoppelt opened 3 years ago
I have hotfixed it as following, but it does not seem to be the right/clean solution.
Index: vendor/oro/oauth2-server/src/Oro/Bundle/OAuth2ServerBundle/Controller/LoginController.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vendor/oro/oauth2-server/src/Oro/Bundle/OAuth2ServerBundle/Controller/LoginController.php b/vendor/oro/oauth2-server/src/Oro/Bundle/OAuth2ServerBundle/Controller/LoginController.php
--- a/vendor/oro/oauth2-server/src/Oro/Bundle/OAuth2ServerBundle/Controller/LoginController.php (revision 8e5ef0fc75949eceebdacfcdcfc9d38664c9d8b0)
+++ b/vendor/oro/oauth2-server/src/Oro/Bundle/OAuth2ServerBundle/Controller/LoginController.php (revision bc6230cc0e6ce8a3f7450fa86a160f6a001a5576)
@@ -4,6 +4,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Oro\Bundle\OAuth2ServerBundle\Entity\Client;
+use Oro\Bundle\OAuth2ServerBundle\Entity\Manager\ClientManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -23,6 +24,7 @@
return array_merge(parent::getSubscribedServices(), [
CsrfTokenManagerInterface::class,
AuthenticationUtils::class,
+ ClientManager::class,
'doctrine' => ManagerRegistry::class
]);
}
@@ -85,6 +87,6 @@
*/
private function getClient(string $clientId): ?Client
{
- return $this->get('oro_oauth2_server.client_manager')->getClient($clientId);
+ return $this->get(ClientManager::class)->getClient($clientId);
}
}
Hi,
we have updated some dependencies in our orocommerce application and face issues with oauth2 "Authorization Code" flow now. Logins are not possible and hit a 500 error
Summary
We updated "oro/oauth2-server" from 4.2.0 to 4.2.4 (https://github.com/oroinc/oauth2-server/compare/4.2.0...4.2.4) and now get a "500 internal server error" when vising https://orocommerce.local/oauth2-token/login
Steps to reproduce
Actual Result
500 error
Expected Result
Not 500 error, get a login-screen
Details about your environment
Additional information
Logs in
var/logs/prod.log
I believe that this change is the cuplrit:
(taken from here https://github.com/oroinc/oauth2-server/compare/4.2.0...4.2.4 )