From 5a880351bf7f4d39f33d5cd2ea4d8c3ccb377f45 Mon Sep 17 00:00:00 2001 From: Noah Miller Date: Fri, 27 Jan 2023 11:30:16 -0800 Subject: [PATCH] Allow OAuth redirect URI to be overridden in client or provider config --- ext/oauth-client/Civi/OAuth/OAuthLeagueFacade.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/oauth-client/Civi/OAuth/OAuthLeagueFacade.php b/ext/oauth-client/Civi/OAuth/OAuthLeagueFacade.php index 27d0c18fcb..be66cfe0c7 100644 --- a/ext/oauth-client/Civi/OAuth/OAuthLeagueFacade.php +++ b/ext/oauth-client/Civi/OAuth/OAuthLeagueFacade.php @@ -36,13 +36,12 @@ class OAuthLeagueFacade { $localOptions['clientId'] = $clientDef['guid']; $localOptions['tenant'] = !empty($clientDef['tenant']) ? $clientDef['tenant'] : ''; $localOptions['clientSecret'] = $clientDef['secret']; - // NOTE: If we ever have frontend users, this may need to change. - $localOptions['redirectUri'] = \CRM_OAuth_BAO_OAuthClient::getRedirectUri(); $options = array_merge( $providerDef['options'] ?? [], $clientDef['options'] ?? [], $localOptions ); + $options['redirectUri'] = $options['redirectUri'] ?? \CRM_OAuth_BAO_OAuthClient::getRedirectUri(); return [$class, $options]; } -- 2.25.1