src/Client.php
public function getLogInUrl(array $scopes, $redirectUri)
    {
        $redirectUri                = (string) $redirectUri;
        $this->_state->redirect_uri = $redirectUri;

        $values = [
            'client_id'     => $this->clientId,
            'response_type' => 'code',
            'redirect_uri'  => $redirectUri,
            'scope'         => implode(' ', $scopes),
            'response_mode' => 'query',
        ];

        $query = http_build_query($values, '', '&', PHP_QUERY_RFC3986);

        // When visiting this URL and authenticating successfully, the agent is
        // redirected to the redirect URI, with a code passed in the query
        // string (the name of the variable is "code"). This is suitable for
        // PHP.
        return self::AUTH_URL . "?$query";
    }
public function getLogInUrl(array $scopes, $redirectUri)
    {
        $redirectUri                = (string) $redirectUri;
        $this->_state->redirect_uri = $redirectUri;

        $values = [
            'client_id'     => $this->clientId,
            'response_type' => 'code',
            'redirect_uri'  => $redirectUri,
            'scope'         => implode(' ', $scopes),
            'response_mode' => 'query',
        ];

        $query = http_build_query($values, '', '&', PHP_QUERY_RFC3986);

        // When visiting this URL and authenticating successfully, the agent is
        // redirected to the redirect URI, with a code passed in the query
        // string (the name of the variable is "code"). This is suitable for
        // PHP.
        return self::AUTH_URL . "?$query";
    }
public function getLogInUrl ( array $ scopes , $ redirectUri ) { $ redirectUri = ( string ) $ redirectUri ; $ this -> _state -> redirect_uri = $ redirectUri ; $ values = [ 'client_id' => $ this -> clientId , 'response_type' => 'code' , 'redirect_uri' => $ redirectUri , 'scope' => implode ( ' ' , $ scopes ) , 'response_mode' => 'query' , ] ; $ query = http_build_query ( $ values , '' , '&' , PHP_QUERY_RFC3986 ) ; // When visiting this URL and authenticating successfully, the agent is // redirected to the redirect URI, with a code passed in the query // string (the name of the variable is "code"). This is suitable for // PHP. return self :: AUTH_URL . "?$query" ; }
Gets the URL of the log in form. After login, the browser is redirected
to the redirect URI, and a code is passed as a query string parameter to
this URI.

The browser is also redirected to the redirect URI if the user is already
logged in.

@param array $scopes
The OneDrive scopes requested by the application. Supported
values:
- 'offline_access'
- 'files.read'
- 'files.read.all'
- 'files.readwrite'
- 'files.readwrite.all'
@param string $redirectUri
The URI to which to redirect to upon successful log in.

@return string
The log in URL.
Gets the URL of the log in form . After login the browser is redirected to the redirect URI and a code is passed as a query string parameter to this URI .