Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mybit's avatar
Level 12

Laravel Socialite enablePKCE

I just want to know where should I $enablePKCE in Laravel Socialite provider: Should it be like this:

Socialite::driver('openid')->enablePKCE()->redirect();
Socialite::driver('openid')->enablePKCE()->user();

or in Provider constructor:

    public function __construct(Request $request)
    {
        parent::__construct($request, '', '', '');
        $this->enablePKCE();
    }

BTW. in Laravel Socialite official Documentation nothing is mention about PKCE at all

0 likes
1 reply

Please or to participate in this conversation.