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:
The details are:
- scope=https://docs.google.com/feeds/ https://spreadsheets.google.com/feeds/ https://docs.googleusercontent.com/
- client_id=mymoodle google domain
Any thoughts on what I'm doing wrong here?
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:
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 - 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.
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.
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!
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.
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.
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.
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.
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.