Title: Google Authentication failed
Last modified: January 13, 2017

---

# Google Authentication failed

 *  [psyntium](https://wordpress.org/support/users/psyntium/)
 * (@psyntium)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/google-authentication-failed/)
 * Hi,
 * After clicking allow on the google authentication page, I’m getting the following
   error:
 * > 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 *****************************
   > 
   > 400. { “error” : “invalid_request” }
 * not sure which step that I did wrong. I tried using another social login plugin
   with google+ and that works, but not this one.
 * [https://wordpress.org/plugins/wordpress-social-login/](https://wordpress.org/plugins/wordpress-social-login/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [psyntium](https://wordpress.org/support/users/psyntium/)
 * (@psyntium)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-7720268)
 * ok.. i noticed that i’ll get this error if i have multiple google IDs registered&
   remembered and clicked one of the IDs to login..
 * but when I’m using incognito mode, with only 1 google ID, it works..
 *  [somanna7](https://wordpress.org/support/users/somanna7/)
 * (@somanna7)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8497296)
 * Hi,
 * I’m facing the same problem as above mention Google Authentication failed,ie 
   After clicking allow on the google authentication page, I’m getting the following
   error:
 * 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” }
 * The plugin which im using is [https://wordpress.org/plugins/wordpress-social-login/](https://wordpress.org/plugins/wordpress-social-login/)
 * so could anyone please help me out to resolve this issue.
 *  [lelio98](https://wordpress.org/support/users/lelio98/)
 * (@lelio98)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8517343)
 * Same problem! Just started too, was working fine last week.
    -  This reply was modified 9 years, 6 months ago by [lelio98](https://wordpress.org/support/users/lelio98/).
      Reason: Select follow-up
 *  [fariazz](https://wordpress.org/support/users/fariazz/)
 * (@fariazz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8527215)
 * Any idea if a solution has been found? I’m having the exact same issue.
 *  [mohammad barghamadi](https://wordpress.org/support/users/mbarghamadi/)
 * (@mbarghamadi)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8531422)
 * hi
    i have same problem too
 *  [sachedar](https://wordpress.org/support/users/sachedar/)
 * (@sachedar)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8540724)
 * 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 9 years, 5 months ago by [sachedar](https://wordpress.org/support/users/sachedar/).
 *  [mohammad barghamadi](https://wordpress.org/support/users/mbarghamadi/)
 * (@mbarghamadi)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8540815)
 * Thanks a lot
    My Problem Solved! You Are Great
 *  [José Cabral](https://wordpress.org/support/users/josecabral/)
 * (@josecabral)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8546918)
 * Hi! Thanks for your answer, it overcomes the problem!
    Can you explain why it
   happens? What’s the problem with that User-Agent? It doesn’t make any sense to
   me…why is it an “invalid request”?
 * Thanks again 😉
 *  [snehal mandhare](https://wordpress.org/support/users/snehal-mandhare/)
 * (@snehal-mandhare)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8650355)
 * I have tried many plugins for eg. social login, social login lite, Yith social
   login, social connect wont work for me. please help why I am unable to login 
   via google ac
 *  [José Cabral](https://wordpress.org/support/users/josecabral/)
 * (@josecabral)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8650589)
 * I ended up forking wordpress-social-login repo and fixing that user-agent problem.
   I think the only change i’ve made was the user agent string.
 * I don’t know how u couldnpt get it to work, its very easy:
    – enable Google+ 
   API integration @ [google developers apis](https://console.developers.google.com/apis)
 * – create the API credentials @ [google developers credentials](https://console.developers.google.com/apis/credentials)
   -
   configure it +/- like this
 * – install the plugin (and maybe do what [@sachedar](https://wordpress.org/support/users/sachedar/)
   said)
    – activate it – put your credentials in the plugin configuration
 * Be free to ask for help if u need
 * cheers

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Google Authentication failed’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-social-login_a1a2bc.svg)
 * [WordPress Social Login](https://wordpress.org/plugins/wordpress-social-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-social-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-social-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-social-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-social-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-social-login/reviews/)

 * 10 replies
 * 8 participants
 * Last reply from: [snehal mandhare](https://wordpress.org/support/users/snehal-mandhare/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/google-authentication-failed/#post-8650355)
 * Status: not resolved