I have a symfony app which serve a RESTful API(for mobile app) and have backend administration.
I can succesfuly login to the backend via facebook, but how should I allow loggin via the RESTful API?
I have a symfony app which serve a RESTful API(for mobile app) and have backend administration.
I can succesfuly login to the backend via facebook, but how should I allow loggin via the RESTful API?
You need to implement oAuth authentication from your client app.
This was answered before:
How to restfully login, Symfony2 Security, FOSUserBundle, FOSRestBundle?
Wooh.. after almost 12 hours(!) here is the solution for anyone who looking for too:
The code
GoDisco/UserBundle/Security/Firewall/ApiFacebookListener.php
GoDisco/UserBundle/DependencyInjection/Security/Factory/ApiFacebookFactory.php
GoDisco/UserBundle/Resources/config/services.yml
app/config/security.yml