Dopbox API v2

Dopbox API v2

by Renaat Debleu -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

The new Dropbox API v2 require that you are running your site using https ($CFG->sslproxy = true;)

However, when I use $CFG->loginhttps and I change the get_login_url() function of the lib/oauthlib.php library to

global $CFG;
$callbackurl = self::callback_url()->out(false);
if ($CFG->loginhttps) {
$callbackurl = str_replace("http://", "https://", $callbackurl);
}
$url = new moodle_url($this->auth_url(),
         array('client_id' => $this->clientid,
           'response_type' => 'code',
            'redirect_uri' => $callbackurl,
            'state' => $this->returnurl->out_as_local_url(false),
                   'scope' => $this->scope,
));
return $url;

I am also able to use the Dropbox API V2.

As far as I see, the other repositories are working fine (when I also updated my Google account oauth2 return url to use https).


Anyone an idea what else can go wrong after this change?



Average of ratings: -