> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ale.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Google

> Guide to adding Google OAuth to `ale`.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_01.png" />
</Frame>

> Start by clicking `GET STARTED` on the **Google Auth Platform** page in the Google Cloud Console.

***

## Overview

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_02.png" />
</Frame>

> On the Overview page, enter the following values and click `CREATE`:

* **App Information:** App name and email for Google OAuth consent-related inquiries.

* **Audience:** External

* **Contact Information:** Email to receive notifications about changes in the project.

* **Finish:** Check the box to agree to Google's policies.

## Branding

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_03.png" />
</Frame>

> On the Branding page, enter the following information about your app domain:

* **Application home page:** `https://app.[domain]`

* **Application privacy policy link:** The privacy policy URL for the service using Google OAuth.

* **Application terms of service link:** The terms of service link.

* **Authorized domains:**
  * Enter the domains used in the application home page, privacy policy link, and terms of service link.
  * If different domains are used, click `ADD DOMAIN` to include all relevant domains.

<Tip>
  You can use Google OAuth without uploading a logo. If you upload a logo, it will require verification.
</Tip>

## Audience

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_04.png" />
</Frame>

> On the Audience page, click `PUBLISH APP` to make the app available for use.

## Client

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_05.png" />
</Frame>

> On the Client page, click `CREATE CLIENT` and configure the OAuth Client ID as follows:

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_06.png" />
</Frame>

* **Application type:** Web application

* **Authorized redirect URIs:** `https://app.[domain]/api/oauth/google/callback`

## Data Access

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_07.png" />
</Frame>

> On the Data Access page, add the required scope as shown in the screenshot above.

<Note>
  The scope to add is `.../auth/userinfo.profile`.
</Note>

## Retrieve Client ID and Secret

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_08.png" />
</Frame>

> On the Clients page in the left sidebar, click the name of the client to retrieve the **Client ID** and **Client Secret**.

***

## Integrate Google OAuth in ale

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/en/02_09.png" />
</Frame>

> Access the operations system, go to **Settings > Authentication  > Google dropdown**, and enter the values retrieved in the previous steps into each field. Then, click `Apply`.

<Tip>
  If the **Enable Login** option is disabled, Google login will be deactivated.
</Tip>

<Info>
  After applying, the **Sign in with Google** button will appear as shown below:

  <Frame>
    <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/en/02_10.png" />
  </Frame>
</Info>

## Sign in with Google

### Sign Up

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/en/01_13.png" />
</Frame>

> After completing the Google login process, the user will be in a pending state, and a message about admin approval will be displayed. Once approved by the admin, the user can log in to `ale`.

<Info>
  To approve (activate) pending users, refer to the [User Management page](/en/operations/user-management#activation).
</Info>

### Sign In

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/setup/ec2/images/en/04_25.png" />
</Frame>

> After admin approval, when attempting to log in with Google, the **Complete Registration** page will be displayed. Enter the appropriate space and name, then click `Complete`.

<Info>
  Upon accessing the dashboard, a space with the specified name will be created, and the [default resources predefined in the operations system](/en/operations/settings#resource-profile-management) will be assigned.
</Info>

<Tip>
  For details on user registration and management, refer to the [User Management page](/en/operations/user-management).
</Tip>
