From ffb2e2ea2801df6afe84c3a867e892d27c049b13 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Thu, 25 Aug 2022 15:18:03 +0100 Subject: [PATCH] Force OAuth RedirectURL to always be backend URL. Otherwise it may get generated as frontend URL and fail to authenticate eg. when 'Inbound email' job run via CRON --- ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php b/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php index e7a0f537fc..6590fe5bf4 100644 --- a/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php +++ b/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php @@ -67,7 +67,7 @@ class CRM_OAuth_BAO_OAuthClient extends CRM_OAuth_DAO_OAuthClient { */ public static function getRedirectUri() { return \Civi::settings()->get('oauthClientRedirectUrl') ?: - \CRM_Utils_System::url('civicrm/oauth-client/return', NULL, TRUE, NULL, FALSE); + \CRM_Utils_System::url('civicrm/oauth-client/return', NULL, TRUE, NULL, FALSE, FALSE, TRUE); } } -- 2.25.1