feat(oauth): set redirect uri as optional and add default value (#5760)

This commit is contained in:
Arnaud Dezandee
2025-05-20 14:35:39 +02:00
committed by GitHub
parent 7a0954fa77
commit 587a927b8b
3 changed files with 8 additions and 4 deletions

View File

@@ -7,6 +7,10 @@ function get_socialite_provider(string $provider)
{
$oauth_setting = OauthSetting::firstWhere('provider', $provider);
if (! filled($oauth_setting->redirect_uri)) {
$oauth_setting->update(['redirect_uri' => route('auth.callback', $provider)]);
}
if ($provider === 'azure') {
$azure_config = new \SocialiteProviders\Manager\Config(
$oauth_setting->client_id,