I use
"symfony/symfony": "~2.8",
"hwi/oauth-bundle": "0.4.*@dev",
"friendsofsymfony/user-bundle": "~2.0"
and for first time try enter to social network I have error:
CRITICAL - Uncaught PHP Exception HWI\Bundle\OAuthBundle\OAuth\Exception\HttpTransportException: "Error while sending HTTP request" at /home/myproject/vendor/hwi/oauth-bundle/OAuth/ResourceOwner/AbstractResourceOwner.php line 257
but when try return back and try again- everything ok, problem identification for both provider,
I add to config verify_peer: false
but still have error for first enter
my config:
hwi_oauth:
http_client:
verify_peer: false
connect:
account_connector: optima_oauth_provider
firewall_names: [main]
resource_owners:
facebook:
type: facebook
client_id: "%facebook_app_id%"
client_secret: "%facebook_app_secret%"
scope: "email"
options:
display: popup
infos_url: "https://graph.facebook.com/me?fields=id,link,name,first_name,last_name,email,picture.type(square)"
paths:
email: email
profilepicture: picture.data.url
google:
type: google
client_id: "%google_app_id%"
client_secret: "%google_app_secret%"
scope: "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"