splix / grails-spring-security-facebook

Facebook Authentication plugin for Grails
http://splix.github.io/grails-spring-security-facebook/index.html
Other
39 stars 35 forks source link

JSONP support #35

Closed richardtz closed 11 years ago

richardtz commented 11 years ago

Hi,

this is not an issue but an enhancement request.

I am building an app for android using phonegap + phonegap-facebook-plugin. I have switched to the new Json Filter, but in the scenario I am working JSON calls are not valid, because of the cross domain security restrictions. (domain of the WebView is local, and ajax calls need to be made to a remote server).

Could you add support for JSONP ? or give some guidance on how to include it in the plugin?

I have changed JsonAuthenticationHandler to support both JSONP or JSON but it could be nice to have it included in the plugin.

Thanks in advance, richard.

splix commented 11 years ago

As I understand PhoneGap have a whitelist for such cases - http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html Does it work for you?

PS I'll add support for JSONP as well

richardtz commented 11 years ago

Yes, you are right, it is valid in this concrete case. But I preferred the JSONP approach as it doesn't need additional configuration for each platform.

(My server needs to have JSONP implemented as it is also queried from common browsers (not mobile apps) which are navigating a different domain )

splix commented 11 years ago

Btw, I should notice that using JSONP for authentication (and GET request) is a possible security hole