Google Docs repository and Moodle 2.3 problem

Google Docs repository and Moodle 2.3 problem

Eric Smith -
回帖数:18

I am aware that the new Google Docs repository requires us to input our OAuth domain and secret key. I've done this, but am still getting errors when a user tries to use the repository (they hit login).

Google returns the following error:

Error: invalid_client

The details are:

Any thoughts on what I'm doing wrong here?

 

回复Eric Smith

Re: Google Docs repository and Moodle 2.3 problem

Dan Poltawski -
Hi Eric,

It sounds like you might've input the OAuth details incorrectly, could you double check they are exactly correct and you've not missed part of it out? Else check your settings against the screenshots/description here:

http://docs.moodle.org/23/en/Google_OAuth_2.0_setup

I know this process is a bit complicated so if there are any places we can make the documentation clearer then please let me know!
回复Dan Poltawski

Re: Google Docs repository and Moodle 2.3 problem

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像

Dan -  I tried on the QA Moodle - I saw that it seemed already to have been set up in ettings > Site administration > Plugins > Repositories > Google Docs. but when I tried to add a file from Google, after being prompted to log in I got this (see below) Is this specific to the QA setup or is it a general error? I am assuming it has been set up on the QA master site. I haven't checked Mt Orange demo but will do so.

回复Mary Cooch

Re: Google Docs repository and Moodle 2.3 problem

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像

Oh -actually - I know what the issue must be with QA Moodle, having just played around on the school demo -the redirect is not right.  How is Google docs meant to work on QA Moodle? Are you setting it up in the master for people to use or are those with admin rights to the QA Moodle supposed to set up their own effort? Just wondering.

回复Mary Cooch

Re: Google Docs repository and Moodle 2.3 problem

Dan Poltawski -
Hi Mary,

I think that the QA site should be pre-configured by Moodle HQ. If its not already please could you raise a MDLSITE issue.

thanks,

Dan
回复Dan Poltawski

Re: Google Docs repository and Moodle 2.3 problem

Eric Smith -

Actually, that did it. I must have missed the link to the OAuth 2.0 setup in the http://docs.moodle.org/23/en/Google_Docs_repository page.

Thanks!

回复Eric Smith

Re: Google Docs repository and Moodle 2.3 problem

Helen Foster -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 Translators的头像

I tried following the instructions in Google OAuth 2.0 setup very carefully and got a bit frustrated when I got an invalid_client error... until I realised it was because I had included some white space in the client ID and secret fields! 小丑

回复Helen Foster

Re: Google Docs repository and Moodle 2.3 problem

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像

So you immediately went and documented it to save others the frustration 大笑

回复Helen Foster

Re: Google Docs repository and Moodle 2.3 problem

Huw Smith -

Where did you include the client ID and secret fields?

After activating google docs in Repositories > Google Docs the only setting I can change is plugin name.

I have created a oauth2callback.php in /admin with the client ID and secret field but I get a warning message that "This website has not registered with Google to establish a secure connection for authorization requests." when I try to login to google docs.

回复Eric Smith

Re: Google Docs repository and Moodle 2.3 problem

Bob Puffer -

There's a difference between setting up a client in your domain and enabling API access in your domain though they look similar.  If you are a Google Apps for Education or Business and have enabled API access for your domain the Google repository for Moodle won't work for you because it expects a "client" and Google won't allow you to create a client and allow API access for the same domain or any subdomains for that domain.

回复Bob Puffer

Re: Google Docs repository and Moodle 2.3 problem

Dan Poltawski -
Bob,

As discussed in MDL-33585, I would like more information on this issue. If it is a limitation from Google's side then we need to work it out.

Note that (as far as I know) generating an OAuth 2.0 client doesn't need any sort of domain specific tie, you can do it on any google account.

If users with institutional google apps accounts are having problems, i'd love to hear about this in MDL-33585.
回复Dan Poltawski

Re: Google Docs repository and Moodle 2.3 problem

Bob Puffer -

Posted on MDL-33585 

I realize Moodle developers like having discussions on the tracker but I stand with the community in believing most people aren't going to go to the tracker to have their conversations or view what's taking place in important issues. So here's the cross-post:

Here's the scenario:
1. Google Apps for Educ (or Business) authorizes use of google APIs in their domain (allowing them to program around their on-campus apps using Google APIs -- common)
2. Moodle's Google repo requires setup of a OAuth 2 client on Google's site containing the calling domain. If this domain is a subdomain of the Google Apps for Ed institutional domain (pretty dang likely) Google will not allow creation of the client because for its purposes that domain already has access to the APIs.

回复Bob Puffer

Re: Google Docs repository and Moodle 2.3 problem

Dan Poltawski -
As also discussed on the tracker, i've asked that you try using a non-apps for edu account to setup the oauth credentials.

You seem to be having more success with that.

I have emailed the Google OAuth 2.0 mailing list to discover more information about setting up OAuth 2.0 credentials on hosted domains.
回复Dan Poltawski

Re: Google Docs repository and Moodle 2.3 problem

Dan Poltawski -
Further to this, I have now closed the bug as I do not believe it is a problem with Moodle. If you follow the instructions carefully then you should not have any issues with using the google plugins for hosted google products.