Hi,

I enabled just one provider google,
- Setup a client on console.developers.google.com
- pasted client ID and client secret from console.developers.google.com to the application ID/consumer secret on admin/config/people/hybridauth/provider/Google

The google icon should in the drupal login box, and clicking on the google icon shows my google accounts.
On selecting one I get the "redirect_uri_mismatch"

Now searching the other 2 threads that quote this. I don't use www anywhere in the name, have confirmed that my domain has been correctly pasted in, and also deleted and readded the client, just in case.

In the google error message it says: "The redirect URI in the request: http://hybridauth.example.ch/hybridauth/endpoint?hauth.done=Google did not match a registered redirect URI." whereas I have configured
"https://hybridauth.example.ch/hybridauth/endpoint?hauth.done=Google"
(note https instead of http)

My website has been setup to be reachable via https.

Anyway I then configured the redirect url to use http and not https (since my site will direct https to http anyway), and now the error has changed to 401:
Error: invalid_client no support email

Now, there is a "email address" field in the google dev console with a format somethingverylong@developer.gserviceaccount.com, however there is no field for this in the hybridauth settings for google.

Perhaps there has been a change in the google API?

Comments

danylevskyi’s picture

1. Go to Google Developers Console
2. Go to APIs & auth, then Consent screen
3. Set email

yoftahe.addweb’s picture

Hello boran,

It seems that while you configured your Google application ID/consumer secret on admin/config/people/hybridauth/provider/Google at that time you can see the message from drupal just above two text boxes like this

Enter your application ID and private key. You can get these by creating a new application at https://code.google.com/apis/console#access.

You must set Authorized Redirect URIs to http://localhost/drupal-7.36/hybridauth/endpoint?hauth.done=Google.

You must set Authorized JavaScript Origins to http://localhost.

You have to set "Authorized JavaScript origins" is http://localhost as mentioned in message

and Authorized redirect URIs is set to http://localhost/drupal-7.36/hybridauth/endpoint?hauth.done=Google mentioned in message.

Let me know incase of any query regarding this.

Thanks,
Nilesh Desai | AddWeb Solution