public function createProvider()
    {
        if($this->providerInfos->clientId && $this->providerInfos->clientSecret)
        {
            $config = [
                'identifier' => $this->providerInfos->clientId,
                'secret' => $this->providerInfos->clientSecret,
                'callback_uri' => $this->getRedirectUri(),
            ];

            return new \League\OAuth1\Client\Server\Twitter($config);
        }
    }