FOSFacebookBundle icon indicating copy to clipboard operation
FOSFacebookBundle copied to clipboard

fix firewall to answer all login entry points

Open bitgandtter opened this issue 13 years ago • 2 comments

...ing for facebook auth

bitgandtter avatar Jul 04 '12 03:07 bitgandtter

I don't understand why it should authenticate the user only when there is no query string. Thus, this will still authenticate for most pages.

stof avatar Jul 04 '12 08:07 stof

In the case that you have multiple authentication providers like the FOSTwitterBundle and Google or other OAth2 the entry point that its defined first in the firewall will response to the authentication process. Here an example of a firewall:

firewalls: main: pattern: ^/ form_login: provider: fos_userbundle csrf_provider: form.csrf_provider logout: true anonymous: true fos_facebook: app_url: http://apps.facebook.com/sunnynews/ server_url: http://sunnynews.com/app_dev.php/ provider: facebook fos_twitter: provider: twitter fos_google: provider: google

in this case twiitter never authenticate the user without this condition because facebook provider always answer.

Maybe the condition need some work or extra validation, but with it if the authentication process dont have a query string then it leave the process and the next entry point in the firewall will intercept it.

bitgandtter avatar Jul 04 '12 12:07 bitgandtter