Installing FOS User Bundle - That is not a typo!
pro tip: feel free to skip this video if you are already confident with setting up FOS User Bundle, or have your own User implementation.
Wait Chris, what?
You're telling me that a pre-req for FOSOAuthServerBundle is FOSUserBundle?!
No, not exactly.
What I am saying is that - in my experience - on projects of sufficient scale to warrant a FOSOAuthServerBundle installation, FOSUserBundle is usually used as our
Your mileage may vary, and of course, you are free to use whatever setup you like.
We are starting this series using the RESTful API we created during the How to code a Symfony 2 RESTful API with FOS REST Bundle tutorial series.
If you haven't yet watched that series, it may be worth doing so, or giving the code a once over before continuing.
We aren't doing anything OAuth-y in this video, but what we do here will have an impact almost immediately.
Why More Bundles?
One of the recent shake-ups in Symfony-land was the publishing of the Best Practices for Organising Your Bundle.
The guideline is to store everything inside one bundle - the
Even though I'm going ahead with a Symfony 2.6 project here, I am going to flaunt this rule in favour of what I consider to be ease of use - in the scope of this tutorial.
The inclusion of FOS User Bundle is likely already pretty controversial, and hopefully not too confusing, so to minimise the amount of crossover, I've decided to create a UserBundle and put any FOSUserBundle stuff in there, hopefully keeping the OAuth code as separate and re-usable as possible.
Again, do what's best for your project here.