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.
Asked
Active
Viewed 1,004 times
2 Answers
1
It may be because Twitter is using Oauth1.0 while Facebook is using Oauth 2.0 for authentication. May be settings are not correct in your project.

SRana
- 125
- 1
- 12
0
When the authentication fail, you should call logout method.
$provider->logout();
then redirect again to the hibridy login. So all Cookies and Session var are reset and the user should be able to re-authorize the app.

Luca Rainone
- 16,138
- 2
- 38
- 52