lib/Dropbox/WebAuth.php
function start($urlState = null, $forceReapprove = false)
    {
        Checker::argStringOrNull("urlState", $urlState);

        $csrfToken = self::encodeCsrfToken(Security::getRandomBytes(16));
        $state = $csrfToken;
        if ($urlState !== null) {
            $state .= "|";
            $state .= $urlState;
        }
        $this->csrfTokenStore->set($csrfToken);

        return $this->_getAuthorizeUrl($this->redirectUri, $state, $forceReapprove);
    }
function start($urlState = null, $forceReapprove = false)
    {
        Checker::argStringOrNull("urlState", $urlState);

        $csrfToken = self::encodeCsrfToken(Security::getRandomBytes(16));
        $state = $csrfToken;
        if ($urlState !== null) {
            $state .= "|";
            $state .= $urlState;
        }
        $this->csrfTokenStore->set($csrfToken);

        return $this->_getAuthorizeUrl($this->redirectUri, $state, $forceReapprove);
    }
function start ( $ urlState = null , $ forceReapprove = false ) { Checker :: argStringOrNull ( "urlState" , $ urlState ) ; $ csrfToken = self :: encodeCsrfToken ( Security :: getRandomBytes ( 16 ) ) ; $ state = $ csrfToken ; if ( $ urlState !== null ) { $ state .= "|" ; $ state .= $ urlState ; } $ this -> csrfTokenStore -> set ( $ csrfToken ) ; return $ this -> _getAuthorizeUrl ( $ this -> redirectUri , $ state , $ forceReapprove ) ; }
Starts the OAuth 2 authorization process, which involves redirecting the user to the
returned authorization URL (a URL on the Dropbox website).  When the user then
either approves or denies your app access, Dropbox will redirect them to the
`$redirectUri` given to constructor, at which point you should
call {@link finish()} to complete the authorization process.

This function will also save a CSRF token using the `$csrfTokenStore` given to
the constructor.  This CSRF token will be checked on {@link finish()} to prevent
request forgery.

See <a href="https://www.dropbox.com/developers/core/docs#oa2-authorize">/oauth2/authorize</a>.

@param string|null $urlState
Any data you would like to keep in the URL through the authorization process.
This exact state will be returned to you by {@link finish()}.

@param boolean|null $forceReapprove
If a user has already approved your app, Dropbox may skip the "approve" step and
redirect immediately to your callback URL.  Setting this to `true` tells
Dropbox to never skip the "approve" step.

@return array
The URL to redirect the user to.

@throws Exception
Starts the OAuth 2 authorization process which involves redirecting the user to the returned authorization URL ( a URL on the Dropbox website ) . When the user then either approves or denies your app access Dropbox will redirect them to the $redirectUri given to constructor at which point you should call { @link finish () } to complete the authorization process .