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 using this library through knpuniversity/oauth2-client-bundle to log in users to my own oAuth2 server. This works great.
The problem I have is that when I want to directly use the Provider configured to get an access token using client_credentials from the command line, the oAuth2 server bounces me.
What I could verify is that when running the command, the redirect_uri does not contain the correct URL as the command does not have the context to generate the URL (Symfony routing). Obviously, a solution would be to set the redirect_uri by hand. But reading the oAuth2 documentation, when using client_credentials, it is not necessary to send redirect_uri.
To solve this, I made a local provider by extending GenericProvider and just overwriting getAccessToken to remove the redirect_uri param when it is client_credentials.
Is what I'm doing correct? If so, I can generate a PR to adjust the functionality directly in GenericProvider.
The text was updated successfully, but these errors were encountered:
I am using this library through
knpuniversity/oauth2-client-bundle
to log in users to my own oAuth2 server. This works great.The problem I have is that when I want to directly use the Provider configured to get an access token using
client_credentials
from the command line, the oAuth2 server bounces me.What I could verify is that when running the command, the
redirect_uri
does not contain the correct URL as the command does not have the context to generate the URL (Symfony routing). Obviously, a solution would be to set theredirect_uri
by hand. But reading the oAuth2 documentation, when usingclient_credentials
, it is not necessary to sendredirect_uri
.To solve this, I made a local provider by extending
GenericProvider
and just overwritinggetAccessToken
to remove theredirect_uri
param when it isclient_credentials
.Is what I'm doing correct? If so, I can generate a PR to adjust the functionality directly in GenericProvider.
The text was updated successfully, but these errors were encountered: