From d03a9819aa29433cdb4e9a6da643a55d88d04011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20=C5=A0tefko?= Date: Sat, 20 Jul 2024 14:32:35 +0200 Subject: [PATCH] Support HTTP Proxy in OIDC --- app/Providers/Socialite/OpenId.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Providers/Socialite/OpenId.php b/app/Providers/Socialite/OpenId.php index dfceca75..299d0aa3 100644 --- a/app/Providers/Socialite/OpenId.php +++ b/app/Providers/Socialite/OpenId.php @@ -3,6 +3,7 @@ namespace App\Providers\Socialite; use GuzzleHttp\RequestOptions; +use Illuminate\Http\Request; use SocialiteProviders\Manager\OAuth2\AbstractProvider; use SocialiteProviders\Manager\OAuth2\User; @@ -15,6 +16,16 @@ class OpenId extends AbstractProvider */ protected $scopes = ['openid profile email']; + /** + * {@inheritdoc} + */ + public function __construct(Request $request, $clientId, $clientSecret, $redirectUrl, $guzzle = []) + { + parent::__construct($request, $clientId, $clientSecret, $redirectUrl, [ + 'proxy' => config('2fauth.config.outgoingProxy') + ]); + } + /** * {@inheritdoc} */