Topic-icon Google Login Can't Work

4 years 4 weeks ago #66196 by nicteo
I've setup a Google login using JFBConnect, filled up the Client ID and Client Secret. Even got the People API verified and approved from Google API team.

But when I click the frontend "Login with Google". It shows the following message (debug turn on):

We were unable to retrieve your Google account information.

Error code 400 received requesting access token: { "error": "invalid_grant", "error_description": "Malformed auth code." }.

Is there anything that we can do about it?
If need website access or screenshot, just let me know.
Thanks and appreciate it very much :)
The topic has been locked.
Support Specialist
4 years 4 weeks ago #66197 by mel
Replied by mel on topic Google Login Can't Work
Can you let me know the following values in your Google App

From the APIs & Services > Credentials tab:
- URIs
- Authorized redirect URLs

-Melissa
The topic has been locked.
4 years 4 weeks ago - 4 years 4 weeks ago #66199 by nicteo
Replied by nicteo on topic Google Login Can't Work
Hi Melissa,

Thanks for your reply.

I'm attaching a screenshot of the current Authorized Redirect URI for your reference.
File Attachment:


Hope to hear from you soon :)
Last edit: 4 years 4 weeks ago by nicteo.
The topic has been locked.
Support Specialist
4 years 3 weeks ago #66202 by alzander
Replied by alzander on topic Google Login Can't Work
Looking at the requests made to Google, it seems like you have an SEF extension that's altering the URLs they are using. At first, Google is requesting the proper URL that looks like below (the long strings will be different for each authentication):

index.php?option=com_jfbconnect&task=authenticate.callback&provider=google&state=b0c43602cfad9ddacbcdcbfb2d1262be&code=4/yAEyP_lOAd3f96hYFjo1t7kDmPAle2O0pEObvHXOv2H2N3b0yD4Br4HByTRF8aw0GtGJQ4kz1wFGbE_QpTG6DGo


But then, something on your site is performing a 301 redirect to:

/component/com_jfbconnect/authuser,3/code,4/yAEyP_lOAd3f96hYFjo1t7kDmPAle2O0pEObvHXOv2H2N3b0yD4Br4HByTRF8aw0GtGJQ4kz1wFGbE_QpTG6DGo/hd

That doesn't look correct.

Can you disable SEF URLs (temporarily) to see if that fixes the issue? If so, then please investigate how to have whatever SEF extension you're using 'skip' generating pretty URLs for JFBConnect. They shouldn't be necessary.

I hope that helps, but if you continue to have issues, just let us know.

Thanks,
Alex
The topic has been locked.
4 years 3 weeks ago #66203 by nicteo
Replied by nicteo on topic Google Login Can't Work
Hi Alex,

Thanks for your quick reply.

I've done as you suggested. I'm using SH404SEF, so I went over to the configuration and clicked "Leave as non-sef" for JFBConnect. The Google login works perfectly now.

Appreciate your solution very much. Thanks and have a good day :)
The topic has been locked.
Support Specialist
4 years 3 weeks ago #66207 by mel
Replied by mel on topic Google Login Can't Work
Glad Alex could help you resolve this. Let us know if you run into any further issues.

-Melissa
The topic has been locked.