src/AuthorizesWithOAuth2.php
protected function getTokenByAuthorizationCodeGrant($code)
    {
        try {
            $token = $this->getAuthorizationServer()->getAccessToken('authorization_code', [
                'code' => $code,
            ]);

            $this->getFrameworkBridge()->persistUserToken($token);

            return $token;
        } catch (IdentityProviderException $e) {
            return null;
        }
    }
protected function getTokenByAuthorizationCodeGrant($code)
    {
        try {
            $token = $this->getAuthorizationServer()->getAccessToken('authorization_code', [
                'code' => $code,
            ]);

            $this->getFrameworkBridge()->persistUserToken($token);

            return $token;
        } catch (IdentityProviderException $e) {
            return null;
        }
    }
protected function getTokenByAuthorizationCodeGrant ( $ code ) { try { $ token = $ this -> getAuthorizationServer ( ) -> getAccessToken ( 'authorization_code' , [ 'code' => $ code , ] ) ; $ this -> getFrameworkBridge ( ) -> persistUserToken ( $ token ) ; return $ token ; } catch ( IdentityProviderException $ e ) { return null ; } }
Authorize a user by redirecting to Northstar's single sign-on page.

@param string $code
@return \League\OAuth2\Client\Token\AccessToken
Authorize a user by redirecting to Northstar s single sign - on page .