microsoft / microsoft/kiota-php
Missing options in oauth provider
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8
- Forks
- 10
- Avg merge
- 10h 16m
- Merged PRs (30d)
- 3
Description
ClientId, ClientSecret and additional parameters are not persisted in oauth provider https://github.com/microsoft/kiota-authentication-phpleague-php/blob/dev/src/Oauth/ProviderFactory.php#L32
Consider the following example
$tenantId = '';
$clientId = '';
$clientSecret = '';
$clientCredentials = new ClientCredentialContext($tenantId, $clientId, $clientSecret);
$accessTokenProvider = new PhpLeagueAccessTokenProvider($clientCredentials);
$accessTokenProvider->getOauthProvider()->authorize();
Details
Result: The request body must contain the following parameter: 'client_id'.
https://login.microsoftonline.com/{$tenantId}/oauth2/v2.0/authorize?state=randomstring&response_type=code&approval_prompt=auto
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Oauth/ProviderFactory.php around line 32 and reproduce the issue with the ClientCredentialContext and PhpLeagueAccessTokenProvider example. Trace how the OAuth provider is created and verify that client_id, client_secret, and additional parameters are retained so the authorization request includes the required client_id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100