diff --git a/src/Omniphx/Forrest/Authentications/WebServer.php b/src/Omniphx/Forrest/Authentications/WebServer.php index 9edf16b..dfbf417 100644 --- a/src/Omniphx/Forrest/Authentications/WebServer.php +++ b/src/Omniphx/Forrest/Authentications/WebServer.php @@ -53,8 +53,9 @@ public function callback() { //Salesforce sends us an authorization code as part of the Web Server OAuth Authentication Flow $code = $this->input->get('code'); + $state = stripslashes($this->input->get('state')); - $stateOptions = json_decode(urldecode($this->input->get('state')), true); + $stateOptions = json_decode(urldecode($state), true); //Store instance URL $loginURL = $stateOptions['loginUrl'];