You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to configure oauth2-client-bundle 2.16 in symfony 6.3 to connect to a generic oauth2 server Laravel passport 11. After several configurations my problem now is that I need the request to this route to be made by METHOD_POST
This route works if I request it with Inmomnia using POST METHOD adding a header with my client_secret in base64 and I get the passport login page:
Authorization: Basic base_64_client_secret <----Is my header
My controller is
/**
* @Route("/connect/passport", name="connect_passport_start")
*/
public function connectAction(ClientRegistry $clientRegistry)
{
// on Symfony 3.3 or lower, $clientRegistry = $this->get('knpu.oauth2.registry');
// will redirect to passport server
return $clientRegistry
->getClient('passport_oauth') // key used in config/packages/knpu_oauth2_client.yaml
->redirect([
'public_profile', 'email' // the scopes you want to access
]);
}
I am trying to configure oauth2-client-bundle 2.16 in symfony 6.3 to connect to a generic oauth2 server Laravel passport 11. After several configurations my problem now is that I need the request to this route to be made by METHOD_POST
Symfony oauth2-client-bunle generates this route:
http://localhost:8080/oauth/authorize?scope=public_profile%20email&state=d9048e90eb368f4b6258128ac171aa9&response_type=code&approval_prompt=auto&redirect_uri=http%3A%2F%2Flocalhost%3A8081%2Fconnect%2Fpassport%2Fcheck&client_id=1
This route works if I request it with Inmomnia using POST METHOD adding a header with my client_secret in base64 and I get the passport login page:
Authorization: Basic base_64_client_secret <----Is my header
My controller is
How can I do to request from my Symfony endpoitn http://localhost:8081/connect/passport get succersfully redirection with METHOD_POST to http://localhost:8080/oauth/authorize?scope... endpoint?
Is this thee correct way to create my client?
Please help me, if you need more code I can add it.
Thanks!
The text was updated successfully, but these errors were encountered: