<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=OAuth_2_Google_service</id>
	<title>OAuth 2 Google service - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=OAuth_2_Google_service"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=OAuth_2_Google_service&amp;action=history"/>
	<updated>2026-05-06T15:38:56Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=OAuth_2_Google_service&amp;diff=4461&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=OAuth_2_Google_service&amp;diff=4461&amp;oldid=prev"/>
		<updated>2024-10-18T06:43:09Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 06:43, 18 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=OAuth_2_Google_service&amp;diff=4460&amp;oldid=prev</id>
		<title>1&gt;Tsala: See also forum discussion links</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=OAuth_2_Google_service&amp;diff=4460&amp;oldid=prev"/>
		<updated>2021-02-18T16:17:19Z</updated>

		<summary type="html">&lt;p&gt;See also forum discussion links&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{OAuth2}}&lt;br /&gt;
==Features requiring the OAuth 2 Google service==&lt;br /&gt;
&lt;br /&gt;
You will need to set up an OAuth 2 Google service in order to use the following features:&lt;br /&gt;
&lt;br /&gt;
* [[Google Drive repository]]&lt;br /&gt;
* [[OAuth 2 authentication]] for enabling users to log in to Moodle with their Google account&lt;br /&gt;
* [[Google Drive converter]] for converting assignment submission files to PDF for teachers to annotate&lt;br /&gt;
&lt;br /&gt;
==OAuth 2 Google service setup==&lt;br /&gt;
&lt;br /&gt;
To set up an OAuth 2 client with Google, log in to the [https://console.developers.google.com/ Google Developers Console] and click the arrow by &amp;#039;Select a project&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:SelectAProject.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;Create a new project&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:New project.png]]&lt;br /&gt;
&lt;br /&gt;
Give it a name. The name is not visible to anyone so you can choose any name you like.&lt;br /&gt;
&lt;br /&gt;
[[File:google-2-create-new-modal.png|none|frame|Name the project]]&lt;br /&gt;
&lt;br /&gt;
Click Credentials from the menu on the left.&lt;br /&gt;
&lt;br /&gt;
[[File:google-3-credentials.png|none|frame|Switch to credentials page]]&lt;br /&gt;
&lt;br /&gt;
Setup the consent screen for your application. This is where you provide the public information that is shown to users when they are asked to authorise your application. Setting a product name is the minimum information that is required, but the more information you provide here - the more confidence users will have when granting this authorisation.&lt;br /&gt;
&lt;br /&gt;
[[File:app information.png|none|frame|Setup consent screen]]&lt;br /&gt;
&lt;br /&gt;
Now you can create some client credentials. Click Credentials from the menu on the left again then click &amp;quot;+ Create credentials&amp;quot; and select OAuth client ID.&lt;br /&gt;
&lt;br /&gt;
[[File:google-5-oauth-credentials.png|none|frame|Create an OAuth Client ID]]&lt;br /&gt;
&lt;br /&gt;
Select Web application as Application type and click to add an authorised redirect URI. This must be set to &amp;quot;your moodle site url + /admin/oauth2callback.php&amp;quot;. If your Moodle site was accessible at &amp;lt;nowiki&amp;gt;https://lemon.edu/&amp;lt;/nowiki&amp;gt; then this callback URL should be set to &amp;lt;nowiki&amp;gt;https://lemon.edu/admin/oauth2callback.php&amp;lt;/nowiki&amp;gt;. Enter the URL then click Create.&lt;br /&gt;
&lt;br /&gt;
[[File:google-6-web-application-credentials.png|none|frame|Set the callback URL]]&lt;br /&gt;
&lt;br /&gt;
When you have saved the information on this page, Google will give you the client ID and client secret that you need to enter into Moodle.&lt;br /&gt;
&lt;br /&gt;
[[File:google-7-oauth-details.png|none|frame|Got my secrets!]]&lt;br /&gt;
&lt;br /&gt;
Finally we have to enable the Drive API (if we want to use the google drive repository or file converter plugins).&lt;br /&gt;
&lt;br /&gt;
Click Library from the menu on the left.&lt;br /&gt;
&lt;br /&gt;
[[File:google-8-library.png|none|frame|View the Library tab]]&lt;br /&gt;
&lt;br /&gt;
Search for drive and select Google Drive API. Click the Enable button.&lt;br /&gt;
&lt;br /&gt;
[[File:google-10-enable-drive.png|none|frame|Enable the API]]&lt;br /&gt;
&lt;br /&gt;
==App verification==&lt;br /&gt;
&lt;br /&gt;
NOTE: If you are just using this for document conversion you will not need to verify (as it only uses one account). You will, however, need to verify your ownership of your domain (see [https://support.google.com/webmasters/answer/35179 Verify your site ownership - Search Console Help].)&lt;br /&gt;
&lt;br /&gt;
The Google Drive repository and Google Drive converter also require the app to be verified by completing the OAuth Developer Verification Form. The list of scopes that Moodle requires are: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;openid profile email https://www.googleapis.com/auth/drive&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Moodle in English forum discussions:&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=356871 Google Drive Repository and Moodle 3.3.1] &lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=416645 Setting up Oauth2 service Google]&lt;br /&gt;
&lt;br /&gt;
[[es:Servicio OAuth 2 Google]]&lt;br /&gt;
[[de:OAuth2 Google Service]]&lt;/div&gt;</summary>
		<author><name>1&gt;Tsala</name></author>
	</entry>
</feed>