From 4efa0bda416c7a4d84b2e417272746b071434021 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 4 Sep 2015 13:05:49 +0100 Subject: [PATCH] Update ConsumerAbstract.php for new HTTP response code As of today, Dropbox is sending a 400 error code in response to the getAccessToken() call that the authenticate() method makes, which was causing the 3-legged flow to abort, as the code wasn't catch-ing that. This amend fixes that and restores functionality. --- Dropbox/OAuth/Consumer/ConsumerAbstract.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dropbox/OAuth/Consumer/ConsumerAbstract.php b/Dropbox/OAuth/Consumer/ConsumerAbstract.php index 8bb2038..fddd144 100644 --- a/Dropbox/OAuth/Consumer/ConsumerAbstract.php +++ b/Dropbox/OAuth/Consumer/ConsumerAbstract.php @@ -51,6 +51,9 @@ protected function authenticate() } catch(\Dropbox\Exception $e) { $this->getRequestToken(); $this->authorise(); + } catch(\Dropbox\BadRequestException $e) { + $this->getRequestToken(); + $this->authorise(); } } }