Spring Boot + Angular 4 +社交和本地登录 [英] Spring Boot + Angular 4 + Social and Local Login

查看:87
本文介绍了Spring Boot + Angular 4 +社交和本地登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找使用Angular 4(通过apache2运行的客户端应用程序),Spring Boot(Rest Controller)以及社交和本地登录来构建应用程序的最佳方法.

I have been searching for the best way to build an application using Angular 4 (client application running over apache2), Spring Boot (Rest Controller) and Social and Local login.

对于这一切我还是有点陌生​​,而且我已经待了大约一个月的时间,但仍然不知道如何实现它!无法找到上述技术的良好教程...

I am kinda new to all of this, and I've be looking around for about one month and still have not a good idea how to implement that! Couldnt find a good tutorial for the tecnologies mentioned above...

我需要能够让用户通过系统自己的登录名和社交登录名(如facebook和google)登录.有人可以指出正确的方向吗?

I need to be able to let the user login via system's own login and social login like facebook and google. Could someone please point at the right direction?

我不确定我是否在正确的轨道上……我认为这很容易,但是我感到非常困惑,并且看不到如何将spring的响应与我的角度应用程序集成在一起.社交网络的登录将不会直接与角度应用程序一起使用.例如,用户将通过Facebook进行身份验证,并且当Facebook重定向到spring时,Ill会检索与该社交网络帐户关联的用户,并将其返回给我的有角度的应用程序.在angular 4应用程序中,应该可以生病邀请朋友并使用其他一些与社交网络相关的功能.

I am not sure if that I am on the right track... I thought that would be easy, but I feel very confuse and dont see how to integrate the response from spring with my angular application. And the login with social networks will not be direct with the angular application. The user will authenticate with facebook, for example, and when facebook redirect to spring, Ill retrieve the user associated to that social networks account and return that to my angular application. In the angular 4 application, Ill should be possible to invite friends and use some other social networks related features.

以下是我已阅读的一些教程: http://www.baeldung.com/angular-4 -upgrade-for-spring-security-oauth/ https://spring.io/guides/tutorials/spring-boot-oauth2/#_ social_login_click

Here are some of the tutorials i've read: http://www.baeldung.com/angular-4-upgrade-for-spring-security-oauth/ https://spring.io/guides/tutorials/spring-boot-oauth2/#_social_login_click

有人可以帮助我,指向正确的方向,或者提供好的教程或任何有帮助的东西吗?

Can someone help me, pointing to the right direction, or placing a good tutorial or anything that would help?

推荐答案

我最后只使用了一个名为ng-social-login的角度模块.在后端,我通过令牌传递了" https://graph.facebook.com/me "来自前端.

I ended up by just using an angular module called ng-social-login. At the backend, I called 'https://graph.facebook.com/me' passing the token that came from frontend.

仅此而已.使用春季社交活动根本不是一个好主意

Thats all. Using spring social wasnt really a good idea at all

这篇关于Spring Boot + Angular 4 +社交和本地登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆