FOSFacebookBundle and FOSUserBundle working together
Asked Answered
T

1

8

I'm developing a website with Symfony2.

I installed FOSUserBundle successfully. Now I would like to install FOSFacebookBundle so that it will work with FOSUserBundle.

I don't really understand the whole "provider user" thing. In the FOSFacebookBundle documentation it says "7. Optionally define a custom user provider class and use it as the provider or define path for login", should I do that to make the two bundles work with each other ? What is that for?

I want to make those two work with each other.

Treat answered 17/1, 2012 at 19:37 Comment(1)
G
7

i recently worked on a project in which i included these two bundles. A user provider is just a class that is responsible for checking auth data. Let's say you have a shop and customers should be able to login, so you have to define a user provider that handles customer entities that are stored in a local database.

But in your case you have Facebook Users that should be able to login. So you define a user provider that can handle these type of users (with the help of the FosFacebookBundle).

It's really simpel. See "Example Custom User Provider using the FOS\UserBundle" chapter further down. You can just copy and paste it into your own bundle.

Gradient answered 3/7, 2012 at 21:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.