FOSFacebookBundle
FOSFacebookBundle copied to clipboard
multiple authentication providers
Hi i use TwitterBundle, FacebookBundle and UserBundle in my application and try to put together this 3 authentication mechanisms, but only get the entry point of the firewall the first i set in my security configuration, so i implement a fix or workaround to this problem. Here is the solution i found:
Before:
FacebookListener.php
/**
Facebook authentication listener. */ class FacebookListener extends AbstractAuthenticationListener { protected function attemptAuthentication(Request $request) { return $this->authenticationManager->authenticate(new FacebookUserToken($this->providerKey)); } }
After:
/**
Facebook authentication listener. */ class FacebookListener extends AbstractAuthenticationListener { protected function attemptAuthentication(Request $request) { if(!$request->getQueryString()) return $this->authenticationManager->authenticate(new FacebookUserToken($this->providerKey)); return null; } }
If there is another way to doit please answer me, thanks.
I will be very glad if FacebookBundle developers fix this issue and get the code merge into the branch.
My word, may all your days be golden. You have just helped me solve a problem that has been the biggest pain in my balls for ages and ages. Thank you.
thanks you are welcome to use my fork of this bundle and contribute to it if you want it