diff --git a/Resources/config/suggested/hwi_oauth.yml b/Resources/config/suggested/hwi_oauth.yml index 9729e60..5a15c44 100644 --- a/Resources/config/suggested/hwi_oauth.yml +++ b/Resources/config/suggested/hwi_oauth.yml @@ -1,5 +1,6 @@ hwi_oauth: # name of the firewall in which this bundle is active, this setting MUST be set + # These settings are overrided in Security/ResourceOwnerFactory. Don't waste your time editing them here. It won't work. firewall_name: main resource_owners: facebook: @@ -25,7 +26,7 @@ security: main: oauth: resource_owners: - facebook: /login/check_facebook + facebook: facebook/login/check_facebook login_path: /login failure_path: /login use_forward: false diff --git a/Resources/views/Facebook/button.html.twig b/Resources/views/Facebook/button.html.twig index d85e64f..dd7bbb0 100644 --- a/Resources/views/Facebook/button.html.twig +++ b/Resources/views/Facebook/button.html.twig @@ -13,9 +13,7 @@ }); } - diff --git a/Security/Hwi/ResourceOwnerFactory.php b/Security/Hwi/ResourceOwnerFactory.php index 433c220..1036951 100644 --- a/Security/Hwi/ResourceOwnerFactory.php +++ b/Security/Hwi/ResourceOwnerFactory.php @@ -54,8 +54,14 @@ public function getFacebookResourceOwner() array( 'client_id' => $this->configHandler->getParameter('facebook_client_id'), 'client_secret' => $this->configHandler->getParameter('facebook_client_secret'), + 'infos_url' => "https://graph.facebook.com/me?fields=id,name,first_name,last_name,email", 'scope' => 'email', - 'paths' => array(), + 'paths' => array( + 'email' => 'email', + 'firstname' => 'first_name', + 'lastname' => 'last_name', + 'nickname' => 'name' + ), 'options' => array() ), 'facebook',