0

I have been working on this for the past two days trying to get the facebook authentication using HybridAuth to work in codeigniter using https://github.com/andacata/HybridIgniter integration. The twitter authentication works fine but i get a user User has cancelled the authentication or the provider refused the connection when i try authorizing with facebook. When i directed to facebook from the site, it reads in the url that user has denied the application even before i enter my facebook details. This then return an empty user id to the application.

4

2 回答 2

1

这可能是因为 Twitter 使用 Oauth1.0 而 Facebook 使用 Oauth 2.0 进行身份验证。可能是您的项目中的设置不正确。

于 2012-08-21T11:00:52.830 回答
0

当认证失败时,您应该调用注销方法。

$provider->logout();

然后再次重定向到 hibridy 登录。因此,所有 Cookie 和 Session var 都被重置,用户应该能够重新授权应用程序。

于 2012-08-21T07:44:28.600 回答