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

Client side authentication problem #53

Closed punnasqrn closed 10 years ago

punnasqrn commented 10 years ago

Hello, As per the document(3.4 Client Side Authentication). facebookAuth:init FB.Event.subscribe('auth.login', function() { window.location.href = '/j_spring_security_facebook_check' }); /facebookAuth:init

$('#fbloginbutton').click(function() { FB.login(); }); /g:javascript when I logged in facebook via FB.login() script, look like I can logged in on my app but it doesn't update user data into FacebookUser and User tables. So what? Am I missing something?
splix commented 10 years ago

does it redirect to '/j_spring_security_facebook_check'? can you reproduce this by using Example App https://github.com/splix/grails-facebook-authentication-example ?

punnasqrn commented 10 years ago

Yes, it does. it redirect to "http://localhost:8080/feed/j_spring_security_facebook_check" ( as per my grails app ) but it return "HTTP Status 401 - Authentication Failed: No cookie". Thank you.

splix commented 10 years ago

Do you have Facebook cookie? Is it really authorized by Facebook? What domain name do you use?

punnasqrn commented 10 years ago

Yes I got the authorization from Facebook because I can see my apps on "App Settings" on facebook and when I used fackbook sdk "FB.login(function(response)" I can access everything such as email,name ect. btw, I forgot to tell you whether this plugin works perfectly on Server Side Authentication by using "facebookAuth:connect" taglib can login logout and store everything to my database. Now I've developed on my local computer thanks.

splix commented 10 years ago

What about cookie? And what domain name do you use on your local computer? make sure that it's not a localhost, *.local or similar, because all this domains doesn't support cookies.

punnasqrn commented 10 years ago

PERFECTLY !! It's done. Just changed my host file ( localhost to domain name ) as you told me. That's very kind of you Mr. Igor Artamonov. Thanks again :+1:

splix commented 10 years ago

You're welcome