• Hi,

    I’m using the social login plugin https://wordpress.org/plugins/wordpress-social-login/ to one of my site which throws below mentioned error on clicking google plus login icon.

    Oops! We ran into an issue.
    Authentication failed. Either you have cancelled the authentication or Google refused the connection.
    Authentication failed! Google returned an invalid code 4/xDid_D2DefHLkUldAp6CCbJNzS4FoBMHRdoMzn-Nov8
    400. { “error” : “invalid_request” }

    so can anyone please help me out to resolve this issue.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Same problem here.

    Solved. Disable line
    curl_setopt($ch, CURLOPT_USERAGENT, $this->curl_useragent ); in file wordpress-social-login/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php

    • This reply was modified 7 years, 7 months ago by ckanza.
    Mian Ji

    (@mianmajiddev)

    This is change in core file, and not valid solution, this will be lost on plugin update, Plugin author should provide valid solution for that.

    I am facing same problem “Authentication failed. Either you have cancelled the authentication or Google refused the connection.” Please help me out.

    Thanks in advance

    hello everyone,

    does anyone have solution for this please help me i am very frustrated.

    My solution was to:

    1) file in hybridauth/Hybrid/Providers/Google.php , replaced:

    $this->api->token_url = "https://accounts.google.com/o/oauth2/token";

    by:

    $this->api->token_url = "https://www.googleapis.com/oauth2/v4/token";

    2) file in hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php , replaced:

    if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, $params );

    by:

    			if($params) {
                                curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params) );
                                curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
                            }
    

    That worked in my case. Good luck.

    • This reply was modified 7 years, 6 months ago by fariazz.

    Je viens d’avoir ce même probleme avec la connexion à partir du compte facebook.
    je l’ai resolu en fesant la mise à jour du plugin WP SOCIAL PLUGIN.
    Merci les amis!

    @fariazz your solution is not working now. What can be done now?

    • This reply was modified 6 years, 8 months ago by techaddict.

    @techaddict those steps were for the previous version of the plugin. With version 2.3.3 the problems disappeared and everything works well on our end.

    No, still occurs the same problem in 2.3.3.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Authentication failed. Either you have cancelled the authentication or Google re’ is closed to new replies.