Skip to content

Commit 5c82956

Browse files
committed
MAG-578: Fix Oauth connection redirect 302
1 parent 3b68a64 commit 5c82956

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Controller/Adminhtml/Config/Oauth2FetchAuthCode.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Payplug\Payments\Controller\Adminhtml\Config;
66

7+
use Laminas\Http\Response;
78
use Magento\Backend\App\Action;
89
use Magento\Backend\App\Action\Context;
910
use Magento\Backend\Model\Auth\Session as AdminAuthSession;
@@ -57,7 +58,10 @@ public function execute(): ResultInterface
5758
try {
5859
PayplugAuthentication::initiateOAuth($clientId, $callbackUrl, $codeVerifier);
5960

60-
return $this->rawFactory->create();
61+
$result = $this->rawFactory->create();
62+
$result->setHttpResponseCode(Response::STATUS_CODE_302);
63+
64+
return $result;
6165
} catch (ConfigurationException $e) {
6266
$this->logger->error($e->getMessage());
6367
$this->messageManager->addErrorMessage(__('Could not retrieve Auth Code from Payplug Portal'));

0 commit comments

Comments
 (0)