Skip to content
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

User has cancelled the authentication or the provider refused the connection #20

Open
zgmunshi opened this issue Jun 25, 2013 · 24 comments

Comments

@zgmunshi
Copy link

Hi,

I am using your Hybridigniter in my project & it works good but i have an issue with this as after some time say a hour or two it starts giving me error 'User has cancelled the authentication or the provider refused the connection'.

Then i need to logout of my account from going to facebook & loggin in again with my project solves the problem.

Kindly let me know what can be the reason for this & how to solve it.

Thanks & Regards,
Zeeshan.

@andacata
Copy link
Owner

I think it's a problem on how are you using the HybridAuth library. If you only use HA to login, you don't need HA anymore within the session. I'm right?

@zgmunshi
Copy link
Author

I am using Hybrid Igniter which is codeigniter plugin of HA.
Sorry but i am not getting you.Can you please tell me solution?

@andacata
Copy link
Owner

Sorry, sometimes I'm too short.

HybridIgniter only connects CodeIgniter with HybridAuth, so you really are working with HybridAuth, but the config is in the correct folder in CI structure and you can load the library in the same way as any other CI library.

On the other hand, what I wanted to say before is that you have to use HI/HA at the time of login. Once the user has logged in correctly, you should not need HI/HA, and you can work directly with the information already retrieved in the login and stored in your session.

If you need to use HI/HA after login, explain a little of your application, to see if I can help.

@zgmunshi
Copy link
Author

zgmunshi commented Jul 6, 2013

Thanks for the response & sorry for the delayed reply.

I don't need to use HI after login but as demo i was trying the code that you gave out with HI & those are the errors i faced.

So,please let me know why that could be happening.

Thanks.

@sunnykango
Copy link

@zgmunshi :: did you get the solution ..?
i have same problem

@zgmunshi
Copy link
Author

No i have moved ahead implementing my code as the task was on urgent basis & the hybrid igniter was looking not good.The solution is not found yet but surely give it a try in detail whenever i get time.

But for now the problem is some thing related to hybrid igniter library.

@sunnykango
Copy link

i fix this problem by creating new app with different name .and now my facebook login working fine....

@rickchew
Copy link

Because your facebook app was in the sandbox mode,kindly disable the sandbox mode

@naveenkrsh68
Copy link

Hi I have integrated your library, I have enabled facebook, twitter and google login. Now i have an issue when logged into the site, the url is not redirecting to the homepage of my site. I got an error like "User has cancelled the authentication or the provider refused the connection." When i login with google i got an error like "Error: invalid_request" Please help me to get fix this issue

@zgmunshi
Copy link
Author

Hi,

Can you please share the url so that i can check & help you in more
detail as i also faced the same problem before but the solution varies
as per your situation.

Regards,
Zeeshan.

On 12/11/13, naveenkrsh68 [email protected] wrote:

Hi I have integrated your library, I have enabled facebook, twitter and
google login. Now i have an issue when logged into the site, the url is not
redirecting to the homepage of my site. I got an error like "User has
cancelled the authentication or the provider refused the connection." When i
login with google i got an error like "Error: invalid_request"


Reply to this email directly or view it on GitHub:
#20 (comment)

@naveenkrsh68
Copy link

Hi,

I got a solution for that. I have passed the redirect url in the library
file itself. So now i could able to access the token. Thanks for your
reply.So nice of you.

On Wed, Dec 11, 2013 at 11:37 AM, Zeeshan [email protected] wrote:

Hi,

Can you please share the url so that i can check & help you in more
detail as i also faced the same problem before but the solution varies
as per your situation.

Regards,
Zeeshan.

On 12/11/13, naveenkrsh68 [email protected] wrote:

Hi I have integrated your library, I have enabled facebook, twitter and
google login. Now i have an issue when logged into the site, the url is
not
redirecting to the homepage of my site. I got an error like "User has
cancelled the authentication or the provider refused the connection."
When i
login with google i got an error like "Error: invalid_request"


Reply to this email directly or view it on GitHub:

#20 (comment)


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-30297127
.

Regards,
M.Navaneetha Krishnan
+91-882 572 3374

@thestormboy
Copy link

me too.only the facebook return data and other no.this is the error User has cancelled the authentication or the provider refused the connection. how can i fixit?

@zgmunshi
Copy link
Author

Please specify clearly what is your error.so that we can help you.

On 1/16/14, thestormboy [email protected] wrote:

me too.only the facebook return data and other no.this is the error User has
cancelled the authentication or the provider refused the connection. how can
i fixit?


Reply to this email directly or view it on GitHub:
#20 (comment)

@thestormboy
Copy link

basicaly i want to integrate hybrydauth into one of my projects and return me theat error.my htaccess look like this: RewriteEngine On RewriteBase / ### Canonicalize codeigniter URLs # If your default controller is something other than # "welcome" you should probably change this RewriteRule ^(welcome(/index)?|index(.php)?)/?$ / [L,R=301] RewriteRule ^(.)/index/?$ $1 [L,R=301] # Removes trailing slashes (prevents SEO duplicate content issues) RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301] # Removes access to the system folder by users. # Additionally this will allow you to create a System.php controller, # previously this would not have been possible. # 'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system. RewriteRule ^(.)$ /index.php/$1 [L] # Checks to see if the user is attempting to access a valid file, # such as an image or css document, if this isn't true it sends the # request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.)$ index.php/$1 [L]
<IfModule !mod_rewrite.c> # Without mod_rewrite, route 404's to the front controller ErrorDocument 404 /index.php
and on config.php i have base_url and index_page empty.The problem is when i go to /hauth and try with facebook looks good and return data from my profile etc but with twitter and others no.why and how can i fix this.please help me out .tnks in advance.

@zgmunshi
Copy link
Author

okay...For debugging if your application is online please provide me
the URL of that so that i can help you.

For now what i got from your message is you are able to connect FB but
twitter & other are giving errors.

For twitter please check your callback URL & let me know if you have
the app online.

Regards,
Zeeshan.

On 1/16/14, thestormboy [email protected] wrote:

basicaly i want to integrate hybrydauth into one of my projects and return
me theat error.my htaccess look like this:
RewriteEngine On RewriteBase / ### Canonicalize codeigniter URLs

If your default controller is something other than # "welcome" you

should probably change this RewriteRule
^(welcome(/index)?|index(.php)?)/?$ / [L,R=301] RewriteRule
^(.*)/index/?$ $1 [L,R=301] # Removes trailing slashes (prevents SEO
duplicate content issues) RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301] # Removes access to the system
folder by users. # Additionally this will allow you to create a
System.php controller, # previously this would not have been possible.

'system' can be replaced if you have renamed your system folder.

RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.)$ /index.php/$1 [L]
# Checks to see if the user is attempting to access a valid file, #
such as an image o
r css document, if this isn't true it sends the # request to index.php
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.
)$ index.php/$1 [L]
<IfModule !mod_rewrite.c> # Without mod_rewrite, route 404's
to the front controller ErrorDocument 404 /index.php
and on config.php i have base_url and index_page empty.The problem is when i
go to /hauth and try with facebook looks good and return data from my
profile etc but with twitter and others no.why and how can i fix this.please
help me out .tnks in advance.


Reply to this email directly or view it on GitHub:
#20 (comment)

@thestormboy
Copy link

http://tinhex.hol.es is live but now needer fb doesn work wtf? if you need ftp access tell me and i send you,tnks

@zgmunshi
Copy link
Author

Ok but its showing CI Welcome Page.Let me know the link to the main
controller where you have put the facebook & other login.

I will ask you if i need FTP access.

Best Regards,
Zeeshan.

On 1/16/14, thestormboy [email protected] wrote:

http://tinhex.hol.es is live but now needer fb doesn work wtf? if you need
ftp access tell me and i send you,tnks


Reply to this email directly or view it on GitHub:
#20 (comment)

@thestormboy
Copy link

tinhex.hol.es/hauth here is the default auth controller

@zgmunshi
Copy link
Author

Ok will check it & let you know.

On 1/17/14, thestormboy [email protected] wrote:

tinhex.hol.es/hauth here is the default auth controller


Reply to this email directly or view it on GitHub:
#20 (comment)

@zgmunshi
Copy link
Author

Send me FTP details or code to look in if you have made the settings correct.

Also please confirm that in twitter app you have mentioned correct
call back URL.

Regards,
Zeeshan.

On 1/17/14, Zeeshan Munshi [email protected] wrote:

Ok will check it & let you know.

On 1/17/14, thestormboy [email protected] wrote:

tinhex.hol.es/hauth here is the default auth controller


Reply to this email directly or view it on GitHub:
#20 (comment)

@thestormboy
Copy link

hosting provider: hostinger.eshost: tinhex.hol.esuser:u100134309pass:qenaTy1991

@TheSniper102
Copy link

update the base_facebook file with this code

public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.1',
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 2

);

it will work

@imbenu
Copy link

imbenu commented Aug 4, 2014

An Error Was Encountered

User has cancelled the authentication or the provider refused the connection.

Same issue with me .can someone help me.This code was working fine yesterday but today its not working.Any specific reason why this happened?

Note:Facebook is working fine,Twitter shows this error.

@abhi12
Copy link

abhi12 commented Apr 8, 2015

An Error Was Encountered

User has cancelled the authentication or the provider refused the connection.

I am also facing the same error on my hosting server but locally its working fine. What might be the possible reasons? Any specific configuration/settings which I need to change apart from the app settings to remove this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants