Facebook login (oauth) integration 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 through Oauth (3 legged). However, spring security plugin no longer supports Oauth out of the box. Any suggestions on how to do this? If you did this before, the examples would be great. Thanks.

+4
source share
5 answers

I started using this:

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

And then I had to switch to:

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

because I need more than just Facebook. However, none of them integrates directly with Spring Security. I was able to get it to work, but returning to the information returned by Facebook and associating it with a specific user, I will then manually log in using the Spring security mechanism. However, the solution is too much to answer here.

I planned to blog about it, but did not have time. If I do this, I will be sure and will contact him here. Sorry, I can’t help anymore. But the Facebook Graph plugin is a very good place to start.

+1
source

There is OAuth for Spring Security . The site has links to a tutorial, as well as a sample project that uses both OAuth 1.0 and OAuth 2.0. I do not know how this can be used in the grail :(

+1
source

It exists, but there is no documentation, and I could not figure out how to use it.

https://github.com/grails-plugins/grails-spring-security-oauth-provider

+1
source

If a little Java does not scare you, I would look at this: http://www.springsource.org/spring-social

It also has a demo site

This project uses most of the same technology as Grails under the hood. All sources are readable. I have the same task that suits my current Grails project, and it is here that I will be inspired.

0
source

A plugin for FaceBook is being actively developed that integrates with the spring security kernel plugin.

http://grails.org/plugin/spring-security-facebook

There are similar plugins for Twitter, etc.

0
source

Source: https://habr.com/ru/post/1338598/


All Articles