diff --git a/src/API/Oauth2Client.php b/src/API/Oauth2Client.php index 14cbd7c9..04f5d067 100644 --- a/src/API/Oauth2Client.php +++ b/src/API/Oauth2Client.php @@ -237,10 +237,11 @@ private function dontPersist($name) { * @return Boolean Whether it exchanged the code or not correctly */ public function exchangeCode() { - if (!isset($_REQUEST['code'])) { + $code = $_GET['code'] ?: $_POST['code']; + if (!isset($code)) { + $this->debugInfo("No code found in _GET or _POST params."); return false; } - $code = $_REQUEST['code']; $this->debugInfo("Code: ".$code);