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

Override abstract provider for Twitter's OAuth 2.0 provider #576

Merged
merged 1 commit into from Feb 7, 2022
Merged

Override abstract provider for Twitter's OAuth 2.0 provider #576

merged 1 commit into from Feb 7, 2022

Conversation

michaeldyrynda
Copy link
Contributor

For Twitter apps that are considered a confidential client i.e. web apps and automated bots, a basic Authorization header must be passed with the getAccessTokenResponse request.

Failure to do so results in authorisation failures when attempting to fetch the authenticated user.

Fortunately, Socialite doesn't need to be aware of the app type as sending the basic header doesn't seem to cause any issues with public Twitter apps, so I've just overridden the getAccessTokenResponse method on the TwitterProvider class to send the client ID and secret as basic username and password.

Addresses #574 (Specifically, the comment here).

@taylorotwell taylorotwell merged commit 9b96dfd into laravel:5.x Feb 7, 2022
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 this pull request may close these issues.

None yet

2 participants