minimaloriginal/social-connect-bundle

The social connect bundle by MinimalOriginal

v0.1.1 2017-11-24 16:02 UTC

This package is not auto-updated.

Last update: 2024-04-28 01:45:14 UTC


README

Register bundle

$bundles = [
    ...
    new MinimalOriginal\SocialConnectBundle\MinimalOriginalSocialConnectBundle(),
];

Register routes

Add the bundle routes which indludes Facebook fallback

mo_social_connect:
    resource: "@MinimalOriginalSocialConnectBundle/Resources/config/routing.yml"

User entity

The user entity have to implements the FacebookUserInterface (and which extends the Symfony's AdvancedUserInterface) because the FacebookUserProvider needs the followings methods : ⋅⋅* setEmail ⋅⋅* setUsername ⋅⋅* setEnabled ⋅⋅* setPlainPassword

use MinimalOriginal\SocialConnectBundle\Security\Core\User\FacebookUserInterface;

class User implements FacebookUserInterface
{
  ...
}

Configuration

minimal_original_social_connect:
  auth:
    facebook:
      id: '%facebook_app_id%'
      secret: '%facebook_app_secret%'