Is it possible to use dual authentication with symfony2?
Users should be able to authenticate themselves with facebook and my own system.
I've read the documentation, and I know that there is the FacebookBundle with I can authenticate a user with facebook, but I don't know how to combinate the two.
Yes. "You can configure a firewall to use more than one authentication mechanisms" : http://symfony.com/doc/current/book/security.html#using-multiple-user-providers
I didn't try it yet but I think it should be something like:
security:
firewalls:
public:
pattern: ^/.*
form_login: true
fos_facebook:
login_path: ^/facebook$
check_path: ^/facebook-check$
default_target_path: /facebook
provider: my_fos_facebook_provider
You can define multiple providers as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With