Google Authentication not Working

Using Gibbon v18.0.00.34 (Cutting Edge Code = 34)

GIT 98a9e379ec4abfd4c372b9e09cccd584966d749e

Google Authentication fails with a truncated Login Form.

Source of Result is attached

Image of the result.

Image of Setup in Gibbon.

Hi Craig,

We registered an issue with this a month or so ago, which was related to the shuttering of Google Plus and related APIs. We made changes to Gibbon to switch away from this to the replacement API. These changes are live in v18. At this time I can’t recreate the issue you are having, and so I wonder if you are using an older commit of v18, or perhaps have some different settings in Gibbon, but from your post it sounds not.

Can you confirm in /lib/Google/index.php what your scopes are set to on line 36. You should see:

$client->setScopes(array(‘email’,
‘profile’,
https://www.googleapis.com/auth/calendar’)); // set scope during user login

Cheers,

Ross

Line 36

`$client->setScopes(array('email',
    'profile',
    'https://www.googleapis.com/auth/calendar')); // set scope during user login`
```


So, I did a little research and you can duplicate the issues by deleting the RefreshToken from your user account. Failure to login by Google is then 100%.  A change in the API I would think.  Enjoy!

Hi,

I am facing the same issue on v18.0.01.

Is there a fix for this?

Sorry Reshi, not fixed for me either…

Hi Craig,

I replaced my index.php file with the one listed on https://github.com/GibbonEdu/core/blob/v18.0.00/lib/google/index.php and that seems to work for me.

Thanks Reshi, The file should have been released with 18.0.01 IMHO. Unfortunately, replacing the file as suggested does NOT work for me.

May I know where exactly can i look for the School Google Calendar ID?is this the same as the google email? Thanks

System Admin: Third Party Settings,

School Google Calendar ID *
Google Calendar ID for your school calendar. Only enables timetable integration when logging in via Google.

Hi @craigray were you able to successfully authenticate? I too had problem authenticating. I got redirected somewhere to the homepage.

Turns out, it was just a minor typo error on my part. Upon checking the google integration page at gibbon, i was pretty sure i got the values correct.

I got a feeling that It maybe caused by the redirect url. So i checked it from my google credentials and see to it that the value is the same as the one i placed at gibbon interface.

As it turns out, there was a typo error on http://domain/lib/google/index.php. There was a trailing end “.” this happened as i copied it from the documentation page and hqve overlooked copying the period too.

No luck there either

Hi, today I just had the same situation. It happened while I tried to install an SSL certificate. Just a few minutes upon setting it up, i tried to login using gmail and that same image happened. But for some reason, I was able to resolve it.

I can see that you are without an SSL certificate as it shows the connection is not secure. However, you must be able to at least successfully authenticate provided that:

  1. the values for google integration in the gibbon interface are correct. (based on my experience this is sensitive between http:// and https://) make sure you put http:// if you dont have SSL certificate and with https:// if you have.
  2. the values in no. 1, should reflect in your google credentials.
  3. you should have activated the google calendar api.
  4. the value in the db gibbonsetting absolute url should be
    http://www.domain.com/yourgibbondirectory” or “https://www.domain.com/yourgibbondirectory” for with SSL certificate and not
    https://domain.com/yourgibbondirectory” or “https://domain.com/yourgibbondirectory” unless of course if you have a redirect setup in your htaccess

If you add a ssl cert, then the redirect url will change.

Yes it is true that the url will change and this also depends on how you enforce redirect in your htaccess.

I am having the same problem and have not come across a way to fix this yet - I have checked all redirect URL’s are correct and have the https in them as the site is secure
I also went into Google and made the credentials from scratch again but no luck.

Hi @athar and @craigray sorry for the delay in replying: I never received an email notification for the most recent posts (must fix the forum software at some point).

If you are still having the issues, are you able to check your PHP and Google logs to see if anything relevant is being recorded there?

Cheers,

Ross