src/Dropbox/Authentication/DropboxAuthHelper.php
public function getAuthUrl($redirectUri = null, array $params = [], $urlState = null)
    {
        // If no redirect URI
        // is provided, the
        // CSRF validation
        // is being handled
        // explicitly.
        $state = null;

        // Redirect URI is provided
        // thus, CSRF validation
        // needs to be handled.
        if (!is_null($redirectUri)) {
            //Get CSRF State Token
            $state = $this->getCsrfToken();

            //Set the CSRF State Token in the Persistent Data Store
            $this->getPersistentDataStore()->set('state', $state);

            //Additional User Provided State Data
            if (!is_null($urlState)) {
                $state .= "|";
                $state .= $urlState;
            }
        }

        //Get OAuth2 Authorization URL
        return $this->getOAuth2Client()->getAuthorizationUrl($redirectUri, $state, $params);
    }
public function getAuthUrl($redirectUri = null, array $params = [], $urlState = null)
    {
        // If no redirect URI
        // is provided, the
        // CSRF validation
        // is being handled
        // explicitly.
        $state = null;

        // Redirect URI is provided
        // thus, CSRF validation
        // needs to be handled.
        if (!is_null($redirectUri)) {
            //Get CSRF State Token
            $state = $this->getCsrfToken();

            //Set the CSRF State Token in the Persistent Data Store
            $this->getPersistentDataStore()->set('state', $state);

            //Additional User Provided State Data
            if (!is_null($urlState)) {
                $state .= "|";
                $state .= $urlState;
            }
        }

        //Get OAuth2 Authorization URL
        return $this->getOAuth2Client()->getAuthorizationUrl($redirectUri, $state, $params);
    }
public function getAuthUrl ( $ redirectUri = null , array $ params = [ ] , $ urlState = null ) { // If no redirect URI // is provided, the // CSRF validation // is being handled // explicitly. $ state = null ; // Redirect URI is provided // thus, CSRF validation // needs to be handled. if ( ! is_null ( $ redirectUri ) ) { //Get CSRF State Token $ state = $ this -> getCsrfToken ( ) ; //Set the CSRF State Token in the Persistent Data Store $ this -> getPersistentDataStore ( ) -> set ( 'state' , $ state ) ; //Additional User Provided State Data if ( ! is_null ( $ urlState ) ) { $ state .= "|" ; $ state .= $ urlState ; } } //Get OAuth2 Authorization URL return $ this -> getOAuth2Client ( ) -> getAuthorizationUrl ( $ redirectUri , $ state , $ params ) ; }
Get Authorization URL

@param  string $redirectUri Callback URL to redirect to after authorization
@param  array  $params      Additional Params
@param  string $urlState  Additional User Provided State Data

@link https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize

@return string
Get Authorization URL