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

# Google Sign In Setup for Self-hosted app

> This guide provides essential instructions for accessing your Databrain account effortlessly using Google Sign-In for self-hosted app.

<Steps>
  <Step title="Create Google OAuth Client">
    Follow the steps mentioned in this link to create a Google OAuth Client:

    <a href="https://www.balbooa.com/help/gridbox-documentation/integrations/other/google-client-id" target="_blank">
      [https://www.balbooa.com/help/gridbox-documentation/integrations/other/google-client-id](https://www.balbooa.com/help/gridbox-documentation/integrations/other/google-client-id)
    </a>
  </Step>

  <Step title="Add URLs While Creating Google OAuth Client">
    **Authorized JavaScript origins:**

    ```text theme={"dark"}
    {YOUR_SELFHOSTED_APP_URL}
    eg: https://selfhosted-abc-org.centralindia.cloudapp.azure.com
    ```

    **Authorized redirect URIs:**

    ```text theme={"dark"}
    {YOUR_SELFHOSTED_APP_URL}/users/sign-in
    eg: https://selfhosted-abc-org.centralindia.cloudapp.azure.com/users/sign-in
    ```

    ```text theme={"dark"}
    {YOUR_SELFHOSTED_APP_URL}/users/sign-up
    eg: https://selfhosted-abc-org.centralindia.cloudapp.azure.com/users/sign-up
    ```

    <Frame>
      <img src="https://mintcdn.com/databrainlabs-bef6850a/6oHBukEqmXlHScVq/images/guides/image-gsis1.png?fit=max&auto=format&n=6oHBukEqmXlHScVq&q=85&s=d5fd5b6b32b194a5284a1d926e57bf43" width="815" height="553" data-path="images/guides/image-gsis1.png" />
    </Frame>
  </Step>

  <Step title="Copy the Google OAuth Client ID">
    After the OAuth client is created, copy the Client ID and Client Secret.

    <Frame>
      <img src="https://mintcdn.com/databrainlabs-bef6850a/6oHBukEqmXlHScVq/images/guides/image-gsis2.png?fit=max&auto=format&n=6oHBukEqmXlHScVq&q=85&s=803632e5890c1e966527ea406fef0b2c" width="900" height="416" data-path="images/guides/image-gsis2.png" />
    </Frame>
  </Step>

  <Step title="Add Google OAuth Client ID env variable in express">
    Add the environment variable to your backend environment configuration:

    ```env theme={"dark"}
    GOOGLE_OAUTH_CLIENT_ID = {YOUR_GOOGLE_OAUTH_CLIENT_ID}
    eg: GOOGLE_OAUTH_CLIENT_ID = 694528862847-u9...nnibb.apps.googleusercontent.com
    ```
  </Step>
</Steps>
