Search code examples
grailsoauthspring-securitygrails-plugin

Integrating Facebook login (oauth) with existing grails application using spring-security-core plugin


I have an existing grails application that uses spring-security plugin for authentication. I would like to add Facebook connect/login which can be done via Oauth (3 legged). However, spring security plugin now does not support Oauth out of the box. Any suggestions on how to go about adding it? If you have done this before, examples would be great. Thank you.


Solution

  • I started out using this:

    http://www.grails.org/plugin/facebook-graph

    And then I had to switch to:

    http://www.janrain.com/products/engage

    because I needed more than just Facebook. However, neither integrate directly with Spring Security. I was able to get it working though but taking the information Facebook returns and associating that to a particular User and then manually logging in through the Spring Security mechanism. However, the solution is too much for an answer here.

    I had planned on blogging about it but haven't had time. If I do, I'll be sure and link to it here. Sorry I can't be of more help. But the Facebook Graph plugin is a very good place to start.