diff --git a/content/applications/general/auth/google.rst b/content/applications/general/auth/google.rst index 3e7eaeba6..2bbfdf9e7 100644 --- a/content/applications/general/auth/google.rst +++ b/content/applications/general/auth/google.rst @@ -1,49 +1,136 @@ -======================================================= -How to allow users to sign in with their Google account -======================================================= +============================= +Google Sign-In Authentication +============================= -- Connect to your Google account and go to the `Google API Dashboard - `_. +The **Google Sign-In Authentication** is a useful function that allows your users to sign in to Odoo +with their Google account. -- Click on **Create Project** and enter the project name and other details. +This is particularly helpful if your organization uses Google Workforce and you want the employees +within your organization to connect to Odoo with their Google Accounts. -.. image:: media/google01.png - :align: center +.. _google-sign-in/configuration: -.. image:: media/google02.png - :align: center +Configuration +============= -- Click on **Use Google APIs** +The integration of the Google sign-in function requires configuration both on Google and on Odoo. -.. image:: media/google03.png - :align: center +.. _google-sign-in/api: -- On the left side menu, select the sub menu **Credentials** (from **API Manager**) then select **OAuth consent screen**. +Google API Dashboard +-------------------- -.. image:: media/google04.png - :align: center +#. Go to the `Google API Dashboard `_. +#. Make sure the right project is opened. If you don't have a project yet, click on *Create + Project*, fill out the project name and other details of your company, and click on *Create*. -- Fill in your address, email and the product name (for example odoo) and then save. + .. image:: google/new-project-details.png + :align: center + :alt: Filling out the details of a new project -.. image:: media/google05.png - :align: center + .. tip:: + Choose the name of your own company from the drop-down menu. -- Then click on **Add Credentials** and select the second option (OAuth 2.0 Client ID). +.. _google-sign-in/oauth: -.. image:: media/google06.png - :align: center +OAuth consent screen +~~~~~~~~~~~~~~~~~~~~ -.. image:: media/google07.png - :align: center +#. On the left side menu, click on :menuselection:`OAuth consent screen`. -- Check that the application type is set on **Web Application**. Now configure the allowed pages on which you will be redirected. + .. image:: google/consent-selection.png + :align: center + :alt: Google oauth consent selection menu -- To achieve this, complete the field **Authorized redirect URIs**. Copy paste the following link in the box: http://mydomain.odoo.com/auth_oauth/signin. Then click on **Create** +#. Choose one of the options **(Internal / External)** as instructed, and click on *Create*. -.. image:: media/google08.png - :align: center + .. image:: google/consent.png + :align: center + :alt: Choice of a user type in oauth consent -.. image:: media/google09.png - :align: center +#. Fill out your details and domain info, then click on *Save and Continue*. +#. On the **Scopes** page, leave all fields as is, and click on *Save and Continue*. -- Once done, you receive two information (your Client ID and Client Secret). You have to insert your Client ID in the **General Settings**. +.. _google-sign-in/credentials: + +Credentials +~~~~~~~~~~~ + +#. On the left side menu, click on :menuselection:`Credentials`. + + .. image:: google/credentials-button.png + :align: center + :alt: Credentials button menu + +#. Click on *Create Credentials* and select **OAuth client ID**. + + .. image:: google/client-id.png + :align: center + :alt: Oauth client id selection + +#. Select **Web Application** as the Application type. Now configure the allowed pages on which you + will be redirected. + + In order to achieve this, in the **Authorized redirect URIs** field, enter your database's domain + immediately followed by ``/auth_oauth/signin``. For example: + ``https://mydomain.odoo.com/auth_oauth/signin``, then click on *Create*. + + .. image:: google/create-client-id.png + :align: center + :alt: Creating oauth client id + +.. _google-sign-in/auth-odoo: + +Google Authentication on Odoo +----------------------------- + +.. _google-sign-in/client-id: + +Retrieve the Client ID +~~~~~~~~~~~~~~~~~~~~~~ + +Once you have done the previous steps, two keys are generated on the Google API Dashboard: *Client +ID* and *Client Secret*. Copy the *Client ID*. + +.. image:: google/secret-ids.png + :align: center + :alt: Google OAuth Client ID generated + +.. _google-sign-in/odoo-activation: + +Odoo activation +~~~~~~~~~~~~~~~ + +#. Go to :menuselection:`Odoo General Settings --> Integrations` and activate **OAuth + Authentication**. + + .. note:: + You may have to log in again after this step. + +#. Go back to :menuselection:`General Settings --> Integrations`, activate **Google + Authentication**, then fill out the *Client ID* with the key from the Google API Dashboard, and + *Save*. + + .. image:: google/odoo-client-id.png + :align: center + :alt: Filling out the client id in Odoo settings + +.. _google-sign-in/log-in: + +Log in to Odoo with Google +========================== + +To link your Google account to your Odoo profile, click on *Log in with Google* when you are asked +to choose a new password. + + .. image:: google/first-login.png + :align: center + :alt: Reset password screen with "Log in with Google" button + +Existing users must :ref:`reset their password ` to access the *reset +password* page, while new users can directly click on *Log in with Google* instead of choosing a new +password. + +.. seealso:: + - `Google Cloud Platform Console Help - Setting up OAuth 2.0 + `_ diff --git a/content/applications/general/auth/google/client-id.png b/content/applications/general/auth/google/client-id.png new file mode 100644 index 000000000..6934ddabe Binary files /dev/null and b/content/applications/general/auth/google/client-id.png differ diff --git a/content/applications/general/auth/google/consent-selection.png b/content/applications/general/auth/google/consent-selection.png new file mode 100644 index 000000000..a92553c42 Binary files /dev/null and b/content/applications/general/auth/google/consent-selection.png differ diff --git a/content/applications/general/auth/google/consent.png b/content/applications/general/auth/google/consent.png new file mode 100644 index 000000000..07b16f3bd Binary files /dev/null and b/content/applications/general/auth/google/consent.png differ diff --git a/content/applications/general/auth/google/create-client-id.png b/content/applications/general/auth/google/create-client-id.png new file mode 100644 index 000000000..b247d2731 Binary files /dev/null and b/content/applications/general/auth/google/create-client-id.png differ diff --git a/content/applications/general/auth/google/credentials-button.png b/content/applications/general/auth/google/credentials-button.png new file mode 100644 index 000000000..1ca2328e7 Binary files /dev/null and b/content/applications/general/auth/google/credentials-button.png differ diff --git a/content/applications/general/auth/google/first-login.png b/content/applications/general/auth/google/first-login.png new file mode 100644 index 000000000..148ed1e5b Binary files /dev/null and b/content/applications/general/auth/google/first-login.png differ diff --git a/content/applications/general/auth/google/new-project-details.png b/content/applications/general/auth/google/new-project-details.png new file mode 100644 index 000000000..d0d911e7e Binary files /dev/null and b/content/applications/general/auth/google/new-project-details.png differ diff --git a/content/applications/general/auth/google/odoo-client-id.png b/content/applications/general/auth/google/odoo-client-id.png new file mode 100644 index 000000000..6282e4a23 Binary files /dev/null and b/content/applications/general/auth/google/odoo-client-id.png differ diff --git a/content/applications/general/auth/google/secret-ids.png b/content/applications/general/auth/google/secret-ids.png new file mode 100644 index 000000000..d0f275cd6 Binary files /dev/null and b/content/applications/general/auth/google/secret-ids.png differ diff --git a/content/applications/general/auth/media/google01.png b/content/applications/general/auth/media/google01.png deleted file mode 100644 index e566bd57e..000000000 Binary files a/content/applications/general/auth/media/google01.png and /dev/null differ diff --git a/content/applications/general/auth/media/google02.png b/content/applications/general/auth/media/google02.png deleted file mode 100644 index d8efa8a90..000000000 Binary files a/content/applications/general/auth/media/google02.png and /dev/null differ diff --git a/content/applications/general/auth/media/google03.png b/content/applications/general/auth/media/google03.png deleted file mode 100644 index e22da632c..000000000 Binary files a/content/applications/general/auth/media/google03.png and /dev/null differ diff --git a/content/applications/general/auth/media/google04.png b/content/applications/general/auth/media/google04.png deleted file mode 100644 index 9b53656af..000000000 Binary files a/content/applications/general/auth/media/google04.png and /dev/null differ diff --git a/content/applications/general/auth/media/google05.png b/content/applications/general/auth/media/google05.png deleted file mode 100644 index 86010d2c1..000000000 Binary files a/content/applications/general/auth/media/google05.png and /dev/null differ diff --git a/content/applications/general/auth/media/google06.png b/content/applications/general/auth/media/google06.png deleted file mode 100644 index bf9aecb5a..000000000 Binary files a/content/applications/general/auth/media/google06.png and /dev/null differ diff --git a/content/applications/general/auth/media/google07.png b/content/applications/general/auth/media/google07.png deleted file mode 100644 index 064b81a97..000000000 Binary files a/content/applications/general/auth/media/google07.png and /dev/null differ diff --git a/content/applications/general/auth/media/google08.png b/content/applications/general/auth/media/google08.png deleted file mode 100644 index b1ec01739..000000000 Binary files a/content/applications/general/auth/media/google08.png and /dev/null differ diff --git a/content/applications/general/auth/media/google09.png b/content/applications/general/auth/media/google09.png deleted file mode 100644 index 72053a474..000000000 Binary files a/content/applications/general/auth/media/google09.png and /dev/null differ