An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix azure oauth not recognizing tenant ID
Pat Rocchiocae9ae51ad52
diff --git a/bootstrap/helpers/socialite.php b/bootstrap/helpers/socialite.phpindex 0773f6de68..0798717e8a 100644--- a/bootstrap/helpers/socialite.php+++ b/bootstrap/helpers/socialite.php@@ -6,19 +6,30 @@ use Laravel\Socialite\Facades\Socialite;function get_socialite_provider(string $provider){$oauth_setting = OauthSetting::firstWhere('provider', $provider);++ if ($provider == 'azure') {+ $azure_config = new \SocialiteProviders\Manager\Config(+ $oauth_setting->client_id,+ $oauth_setting->client_secret,+ $oauth_setting->redirect_uri,+ ['tenant' => $oauth_setting->tenant],+ );+ return Socialite::driver('azure')->setConfig($azure_config);+ }+$config = ['client_id' => $oauth_setting->client_id,'client_secret' => $oauth_setting->client_secret,'redirect' => $oauth_setting->redirect_uri,- 'tenant' => $oauth_setting->tenant,];+$provider_class_map = [- 'azure' => \SocialiteProviders\Azure\Provider::class,'bitbucket' => \Laravel\Socialite\Two\BitbucketProvider::class,'github' => \Laravel\Socialite\Two\GithubProvider::class,'gitlab' => \Laravel\Socialite\Two\GitlabProvider::class,'google' => \Laravel\Socialite\Two\GoogleProvider::class,];+return Socialite::buildProvider($provider_class_map[$provider],$configdiff --git a/config/services.php b/config/services.phpindex 509e737569..db81eef9ae 100644--- a/config/services.php+++ b/config/services.php@@ -30,4 +30,12 @@ return ['secret' => env('AWS_SECRET_ACCESS_KEY'),'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),],++ 'azure' => [+ 'client_id' => env('AZURE_CLIENT_ID'),+ 'client_secret' => env('AZURE_CLIENT_SECRET'),+ 'redirect' => env('AZURE_REDIRECT_URI'),+ 'tenant' => env('AZURE_TENANT_ID'),+ 'proxy' => env('AZURE_PROXY'),+ ],];