简体   繁体   English

与Facebook的春季社交登录无法正常工作

[英]Spring social SignIn with Facebook not working

I work on an application and i want to add ProviderSignIn features. 我在一个应用程序上工作,我想添加ProviderSignIn功能。 I place a button on my web page so people could connect ( signin) to my application using facebook. 我在网页上放置了一个按钮,以便人们可以使用Facebook连接(登录)到我的应用程序。 As documentation says ( http://docs.spring.io/spring-social/docs/1.0.3.RELEASE/reference/html/signin.html ), the oAuth dance : 1. POST is made to signin/facebook work(seen in firebug) 2. GET is made to signin/facebook?code="somecode" work(seen in firebug) 3. GET is made to signin but this just displays my view signin. 正如文档所述( http://docs.spring.io/spring-social/docs/1.0.3.RELEASE/reference/html/signin.html),oAuth舞蹈:1. POST用于登录/ facebook工作(在Firefox中看到)2.进行登录/ facebook?code =“ somecode”工作(在firebug中看到)3.进行登录,但这仅显示我的视图登录。

The documentation says : 该文件说:

If any error occurs while fetching the access token or while fetching the user's profile data, ProviderSignInController will redirect to the application's sign in URL. 如果在获取访问令牌或获取用户的配置文件数据时发生任何错误,则ProviderSignInController将重定向到应用程序的登录URL。 The request to the sign in URL will have an "error" query parameter set to "provider" to indicate an error occurred while communicating with the provider. 对登录URL的请求会将“错误”查询参数设置为“提供者”,以指示与提供者进行通信时发生了错误。 The default sign in URL is "/signin" (relative to the application root), but can be customized by setting the signInUrl property. 默认的登录URL是“ / signin”(相对于应用程序根目录),但可以通过设置signInUrl属性进行自定义。

At step 3, my url is signin# = and not signin with error query parameter. 在第3步中,我的网址是signin# =,而不是使用错误查询参数登录。

I don't understand why i am not getting error in query parameter ? 我不明白为什么我的查询参数没有错误?

Just create your own controller which extends ConnectController and implements it's methods. 只需创建自己的控制器即可扩展ConnectController并实现其方法。 It worked for me. 它为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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