thephpleague / oauth1-client

OAuth 1 Client
MIT License
968 stars 73 forks source link

Fixes #139: fix error about twitter scope when getting temporary credentials #140

Closed Diegslapasteque closed 3 years ago

Diegslapasteque commented 3 years ago

Hey, Here is a fix about my last pull request that added support for the Twitter x_auth_access_type parameter. I thought that the API need it in the Authorization header, but after a lot of research, I found that this parameter needs to be specified in the query string. Also, it needs to be present when the URL is signed for the oauth request.

This time I test my work and all is good. Sorry again.

bencorlett commented 3 years ago

Hey, thank you for this!

The change from read as the default scope to null would normally be a BC break, however because this actually wasn't working, I'm fine with the change to default to nothing; in fact I prefer it.

I have added an extra commit to your branch to add some unit tests to prove your logic works too and I've verified from the docs that a configured scope affects the x_auth_access_type query parameter of the temporary credentials URL.

I will actually release v1.9.3 reverting your original MR, then v1.10.0 with this MR in it, given it's actually really a new feature.

Thanks again!

bencorlett commented 3 years ago

I rebased this MR on top of develop and merged it via this commit. This still includes your original commit, but because of the rebase, this MR wasn't seen as automatically merged.

Thanks again!