Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractProvider::getAccessToken must send default scopes #1029

Open
liayn opened this issue May 16, 2024 · 0 comments · May be fixed by #1030
Open

AbstractProvider::getAccessToken must send default scopes #1029

liayn opened this issue May 16, 2024 · 0 comments · May be fixed by #1030

Comments

@liayn
Copy link

liayn commented May 16, 2024

Using password grant to retrieve an access token some (all?) providers require a scope to be sent along.
Examples are: Microsoft EntraID, WSO2
Documentation: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth-ropc#authorization-request

\League\OAuth2\Client\Provider\AbstractProvider::getAccessToken should therefore be adjusted to:

  1. Allow passing an array of scopes as an option
  2. Fall back to the default scopes of the provider if none are provided in step 1

Keep in mind that it is impossible to make a workaround for this issue.
That is due to the fact that it is not possible to retrieve the scope separator or default scopes from outside a provider (methods are protected in interface!).

liayn added a commit to liayn/oauth2-client that referenced this issue May 16, 2024
liayn added a commit to liayn/oauth2-client that referenced this issue May 16, 2024
@liayn liayn linked a pull request May 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant