Google OAuth 2.0 setup: Difference between revisions
Helen Foster (talk | contribs) (→Registering with Google: enabling the Drive API (new in 2.5)) |
Helen Foster (talk | contribs) (→Registering with Google: enabling the Drive API) |
||
(19 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Repositories}} | {{Repositories}} | ||
''Note: This page contains information for site administrators only.'' | ''Note: This page contains information for site administrators only.'' | ||
==Registering with Google== | ==Registering with Google== | ||
Each Moodle site | Each Moodle site needs to be registered with Google i.e. have a Google Developers Console project in order to use the Google Drive, Docs or Picasa plugins. As part of the registration process, you will need to enter an authorized redirect URI (something like <nowiki>http://yourmoodlesite.org/admin/oauth2callback.php</nowiki>) which is provided on all Google Drive, Docs and Picasa plugins configuration pages in Moodle, such as ''Site administration > Plugins > Repositories > Google Drive''. | ||
To create a Google Developers Console project: | |||
# Go to the [https://console.developers.google.com/ Google Developers Console] and sign in to your Google account. | |||
# Follow the instructions provided in the Google Developers doc [https://developers.google.com/identity/sign-in/web/devconsole-project Creating a Google Developers Console project and client ID]. | |||
# When creating a new Client ID | |||
#* In the Application type section of the dialog, select Web application. | |||
#* Leave the Authorized JavaScript origins field empty and in the Authorized redirect URI field, enter the URL from your site. | |||
Tip: If you have more than one Moodle site to register with Google, you can add an authorized redirect URI for each site | Tip: If you have more than one Moodle site to register with Google, you can add an authorized redirect URI for each site. The same name and logo would then be displayed on the authorisation screen for each Moodle site. | ||
You will also need to enable the Drive API: | |||
# In Google API manager, under Google Apps APIs, follow the link 'Drive API'. | |||
# Click the button to enable it. | |||
==Configuring the Google | ==Configuring the Google Drive and Picasa repositories== | ||
# Go to '' | # Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories'' | ||
# Activate the Google | # Activate the Google Drive and/or Picasa repositories by selecting 'Enable and visible' in the dropdown menu | ||
# Configure each repository by entering the client ID and secret. Make sure you don't include any white space in the text boxes! | # Configure each repository by entering the client ID and secret. Make sure you don't include any white space in the text boxes! | ||
# Save changes | # Save changes | ||
==Configuring the Google | ==Configuring the Google Drive and Picasa portfolios== | ||
# Go to '' | # Go to ''Administration > Site administration > Plugins > Portfolios > Manage Portfolios'' | ||
# Activate the Google | # Activate the Google Drive and/or Picasa portfolios by selecting 'Enable and visible' in the dropdown menu | ||
# Configure each portfolio by entering the client ID and secret | # Configure each portfolio by entering the client ID and secret | ||
# Save changes | # Save changes | ||
Once configured, Google will present Moodle users with a nice authorisation screen with your Moodle site name and logo for your users to authorise. | Once configured, Google will present Moodle users with a nice authorisation screen with your Moodle site name and logo for your users to authorise. | ||
Line 57: | Line 39: | ||
[[Category:Portfolios]] | [[Category:Portfolios]] | ||
[[Category:Site administration]] | [[Category:Site administration]] | ||
[[es:Configuración de Google OAuth 2.0]] |
Latest revision as of 13:02, 18 April 2016
Note: This page contains information for site administrators only.
Registering with Google
Each Moodle site needs to be registered with Google i.e. have a Google Developers Console project in order to use the Google Drive, Docs or Picasa plugins. As part of the registration process, you will need to enter an authorized redirect URI (something like http://yourmoodlesite.org/admin/oauth2callback.php) which is provided on all Google Drive, Docs and Picasa plugins configuration pages in Moodle, such as Site administration > Plugins > Repositories > Google Drive.
To create a Google Developers Console project:
- Go to the Google Developers Console and sign in to your Google account.
- Follow the instructions provided in the Google Developers doc Creating a Google Developers Console project and client ID.
- When creating a new Client ID
- In the Application type section of the dialog, select Web application.
- Leave the Authorized JavaScript origins field empty and in the Authorized redirect URI field, enter the URL from your site.
Tip: If you have more than one Moodle site to register with Google, you can add an authorized redirect URI for each site. The same name and logo would then be displayed on the authorisation screen for each Moodle site.
You will also need to enable the Drive API:
- In Google API manager, under Google Apps APIs, follow the link 'Drive API'.
- Click the button to enable it.
Configuring the Google Drive and Picasa repositories
- Go to Administration > Site administration > Plugins > Repositories > Manage Repositories
- Activate the Google Drive and/or Picasa repositories by selecting 'Enable and visible' in the dropdown menu
- Configure each repository by entering the client ID and secret. Make sure you don't include any white space in the text boxes!
- Save changes
Configuring the Google Drive and Picasa portfolios
- Go to Administration > Site administration > Plugins > Portfolios > Manage Portfolios
- Activate the Google Drive and/or Picasa portfolios by selecting 'Enable and visible' in the dropdown menu
- Configure each portfolio by entering the client ID and secret
- Save changes
Once configured, Google will present Moodle users with a nice authorisation screen with your Moodle site name and logo for your users to authorise.