-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social Sign in functionality #1649
Comments
We've already tried to make this, but without success. Not enough people looked interested, but maybe this has changed today, now that the project is more and more popular? |
Yep in my experience so far this is the best thing i got chance to work on thumbs up! |
+1
|
I like the idea to use social login. I use it really often (most of the time with my github account, don't know if spring social offers such an integration, but twitter, google and facebook will be sufficient for most people I guess), |
There is one stop solution for all these. https://github.com/cloudfoundry/uaa Advantages with Integrating with UAA
|
Sounds interesting, it raises some questions though:
|
|
Actually, @jdubois mentioned it would be nice to integrate Cloud Foundry UAA in conjunction with a new micro-services oriented architecture in the JHipster 3.0 discussion thread. I've been meaning to have a look at it, but I've been busy lately... However, some pointers would be highly appreciated. |
Yes, I've been testing CloudFoundry UAA and I had very high expectations for it. Unfortunately, I'm rather disappointed: it can't connect to other security providers, and it doesn't build with Java 8... |
Hello I find this topic interesting |
@jdubois I have implemented the social login based on Spring Social: https://github.com/hyuan/jhipster-sample-app I borrowed some codes from jcr216's work. Still have some places to improve (like add/remove connections to user's account) but the basic functionalities are there. Can you take a look and check If I am in the right direction? Feedback is welcome. If it's OK, then I can convert it to generator. |
@hyuan I don't find your modifications (or branch) on your repository: https://github.com/hyuan/jhipster-sample-app |
@moifort Sorry, I didn't realized that the push was failed last night. Please try again. |
@hyuan great job! When I have the time I will try your modification. Just be careful you left your id and code in the |
@hyuan Does it work in addition to the integrated user database or does it replace it? |
@atomfrede Yes, the connection is stored in JHI_UserConnection table. it's a new db table. |
@hyuan I think its "yes it replaces it"? |
@atomfrede No, it doesn't replace the integrated user database. The JHI_USER table is kept unchanged. I added JHI_UserConnection table to store user's social connections. |
Ok, great! Will try to have a look during the week. |
@moifort Thanks for reminding! Those IDs and codes are for testing. I left them there as examples. |
I have tried with mvn spring-boot:run It fails because can't create the userService bean: [INFO] com.mycompany.myapp.config.WebConfigurer - Web application fully configured |
There isn't some entity for the JHI_UserConnection table. Did I miss any step? |
@pecko The error is caused by a circular reference. Weird, it works on my machine. I will fix that. The JHI_UserConnection table is used by org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository. No entity class is created for it. |
@hyuan I have just cloned and called 'mvn spring-boot:run" on Ubuntu. The npm, bower, yo, jhipster are the latest. You probably have some stuff that isn't pushed or something in .gitignore. Could you try to clone in a new directory and run the application? |
@pecko I found I didn't submit two folders - bootstrap-social and font-awesome - in bower_components. Is it because of that? Can you run "bower install" and try again? |
@hyuan I have already tried that, got these two directories and had the same error. Now, I clear my clone, pull again and get the same error again. Do you try clone in a separate directory and run the application? If it work, what OS/JDK you are using? Do you have some specific maven repository in the ~/.m2/settings.xml? |
@pecko I will try it on a different machine. Can you post your error message? |
The complete error log from 'mvn spring-boot:run' (I have run 'bower install' and 'npm instal'' too):
|
@pecko I think that's because of a circular reference. I adjusted the injection. The latest version I committed about 7 hours ago should include this change. Are you using the latest commit? |
Yes, I am. It is hyuan/jhipster-sample-app@4170907 Does it work for you in a separate clone? |
I have tried on Windows 7 (this machine doesn't even have npm, node, bower ...) and 'mvn spring-boot:run' works. The facebook, google links don't work, but it is probably because localhost in server URL. So, there is probably an issue on Linux.. |
facebook, google links dont work work because client key/secret are invalid On Fri, Jul 10, 2015 at 6:11 PM, Haris Peco [email protected]
|
I understand. Thanks. I will also check what is the problem on Linux. |
BTW, in the latest version, you can start to add/remove social connections under Account / Connections menu. Still need some work but you can give it a try now. |
@hyuan My primary development environment is Linux. I will try to find Linux issue firstly. |
I think that this is a spring issue. The SocialConfigurationAdaptor.signin property isn't initialized on Windows (or it is initialized after calling the getUsersConnectionRepository method). On Linux, Spring try to initialize that and faces circular reference. The PR: hyuan/jhipster-sample-app#1 fixes this issue, but I have seen a new issue. The application starts on Linux, but the Session and Connections menus aren't visible. All is fine on Windows. |
@jdubois if you like I can write the generator based on my sample code -https://github.com/hyuan/jhipster-sample-app. Maybe you'd like the micro-services approach, but we can let jhipster to generate a simple UAA with this feature, at least it's one step closer to your plan. What's your opinion? |
Hi @hyuan have you been able to implement this using mongodb? I need to implement the same solution using mongodb. |
@alchemistgo87 Not yet. But I think it should be very similar. |
Hi, this ticket looks to have gone to another direction since it was first created... Let me try to summarize:
-> Should I close this thread? Maybe we should wait until someone has a good Spring Boot / CloudFoundry UAA integration, as this should be fairly common? |
I can complete my changes and submit a PR. but looks like it's not your preferred approach. so I hesitate should I put more efforts into it. |
Yes, you are correct, unfortunately... |
First, thanks for try to resolve this feature. Maybe, could be added a new branch with @hyuan solution or the CloudFoundry UAA. Or let the generator to ask if you want a social implementation and which. |
+1 This is very important |
As I commented earlier: a lot of people seem to need this, but nobody is interested in working on this... As I personally already have too much work with the 3 available authentication methods (2 of which I didn't coded, and I have a lot of trouble with them), I'm not going to add a 4th version myself. So if there is a simple solution (there should be, this is supposed to work out-of-the-box with Spring Security) I would be happy to merge this. But I'm afraid this ticket is going to get closed (again) for lack of interest of the developers. |
Hello everybody! I am working on this feature now! You have my actual code here: https://github.com/moifort/jhipster-app-social Enjoy! |
This is very cool Thibaut - thanks for sharing! Do you have documentation or a blog post about how you did it? P.S. The animated gif is a nice touch.
|
Very cool. Looking forward to try it out. Does it work with twitter and github too? |
@mraible not yet, I begin the development but you can see my code here: https://github.com/moifort/jhipster-app-social. And for the gif I use Licecap available for Mac and Windows here: http://www.cockos.com/licecap/. @atomfrede oh hell yes, here the list:
more information here: http://projects.spring.io/spring-social/ |
👍 Thank you @moifort! This will be an excellent addition! |
@moifort Is there a documentation on how to configure Social sign in? |
@pplsreport please don't comment on an old issue. You can also use this github search of the generator's code to help you find the social sign-in related changes: |
OK. Thanks |
Hi,
I was thinking it would be great if you can include social sign in functionality in jhipster
The text was updated successfully, but these errors were encountered: