laravel / socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.
https://laravel.com/docs/socialite
MIT License
5.58k stars 940 forks source link

Bug with Microsoft ADFS after PR 684 #693

Closed kichetof closed 9 months ago

kichetof commented 9 months ago

Socialite Version

5.12.0

Laravel Version

10.44.0

PHP Version

8.3.2

Database Driver & Version

Mysql 8.3.0

Description

Hi guys,

just updated packages and Socialite doesn't works after updated Sociliate to 5.12.0 with Microsoft ADFS. (Works fine with 5.11.0)

{"error":"invalid_request","error_description":"MSIS9631: Received invalid OAuth request. Multiple client authentication (truncated...)

Similar issue here and MS ADFS doesn't support both POST and Headers authentifications.

Thanks for your help!

Steps To Reproduce

Upgrade to Sociliate 5.12.0 and try to connect to MS ADFS

driesvints commented 9 months ago

We don't support MS ADFS sorry

kichetof commented 9 months ago

@driesvints thanks for reverting; breaking change for other people I see

In case this change come back, add this to your ADFSProvider


class ADFSProvider extends AbstractProvider
{
    // ...

    /**
     * Get the headers for the access token request.
     *
     * FIX Issue https://github.com/laravel/socialite/issues/693
     *
     * @param  string  $code
     * @return array
     */
    protected function getTokenHeaders($code)
    {
        return ['Accept' => 'application/json'];
    }

    // ...
}
driesvints commented 9 months ago

Yeah sorry about that. We reverted the affecting PR.