简体   繁体   中英

Grails: spring-security-facebook plugin and login page integration

I have been trying out the spring-security-facebook plugin and so far its been smooth. I am able to use the facebook login button and have also created the FacebookAuthService for some custom processing - in creating my own user object and associating it with the facebook domain object.

However, what I want to do is integrate the button with the auth.gsp provided by spring-ui. I was able to take the first step in this and the button now appears along with the regular login form. However, on clicking on the FB login button, I want the workflow to be the same as that of the regular spring flow.

Are there any pointers for this?

I assume I will need to stop using the facebookAuth:connect tag and instead build this part of the flow using javascript - but how do I get the logged in user now connected to spring so that on clicking the FB button, the page then goes to the page that I was earlier trying to access before spring security redirected me to the auth page?

Any directions for this would be much appreciated, thanks.

Spring-Security-Facebok plugin uses cookies provided by Facebook (set by JS SDK after auth). I mean there is two steps: first step is when user is logged into app on client side (done by javascript), and second when page is reloaded and server login user on server side too.

Probably you can make your own Javascript event listener on 'auth.login' , and redirect to requred page. User will be authenticated at this point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM