﻿# Google OAuth Client ID Configuration

## For Integration with Acrobits Signpost and NetSapiens Portal

This guide explains how to reconfigure your existing Google OAuth Client ID in the Google Cloud Console for use with Acrobits CloudSoftphone app login.

## 1. Access the Google Cloud Console

- Navigate to [https://console.cloud.google.com](https://console.cloud.google.com).
- Sign in using the Google account that manages your company's existing OAuth credentials.
- Ensure you are in the same project where your NetSapiens OAuth Client is registered.

## 2. Open the Credentials Section

- From the left-hand menu, go to **APIs & Services > Credentials**.
- Locate the OAuth 2.0 Client ID currently used for your NetSapiens portal.
    - This is typically of type **Web application**.
- Click on the client name to open its details.

## 3. Update Authorized JavaScript Origins

Under the **Authorized JavaScript origins** section, ensure the following URLs are included:

| Environment | URL |
| :--- | :--- |
| **Production** | `https://login.cloudsoftphone.com` |
| **Staging** | `https://signpost.lab.inner.acrobits.cz` *(Only needed if working with Acrobits on testing)* |
| **Development** | `http://localhost` `http://localhost:5173` *(Only needed for local development/testing)* |

!!! note
    Most customers only need the **Production** URL. The Staging and Development URLs are only required if you are working with Acrobits on testing or development.

!!! warning
    If these URLs already exist, leave them unchanged. If not, click **Add URI** and enter them one by one.

## 4. Update Authorized Redirect URIs

Under the **Authorized redirect URIs** section, add the Signpost callback URLs used by the login service.

!!! warning
    The redirect URI must match exactly the value used in the OAuth request (including the full path). If it does not match, Google will return a `redirect_uri_mismatch` error.

| Environment | Redirect URI |
| :--- | :--- |
| **Production** | `https://login.cloudsoftphone.com/signpost/google/callback` |
| **Staging** | `https://signpost.lab.inner.acrobits.cz/signpost/google/callback` *(Only needed if working with Acrobits on testing)* |
| **Development** | `http://localhost:5173/signpost/google/callback` *(Only needed for local development/testing)* |

- **Keep any existing redirect URIs** used by your NetSapiens portal.
- **Add** the above entries in addition to existing ones (**do not replace them**).
- After entering the URIs, click **Save**.

## 5. Verify the OAuth Consent Screen

If this is your first time configuring Google OAuth for external use:

- Go to **APIs & Services > OAuth consent screen**.
- Ensure that:
    - The **App name**, **support email**, and **developer contact email** are filled in.
    - The **Scopes** include standard Google profile and email scopes (these are added automatically when you use Sign-In with Google).
- **Publish** the consent screen if necessary (ensure it is not in "Testing" mode if you are ready for production).

!!! note
    If your OAuth consent screen is already published and configured, you can skip this step.

## 6. Provide Client Details to Acrobits

Once saved, go back to the Credentials overview:

- Copy the **Client ID** (a long string of letters and numbers ending in `.apps.googleusercontent.com`).
- Optionally copy the **Client Secret** if backend communication is required.
- Send the **Client ID** to your Acrobits representative (for example, via Slack or another secure method).

!!! info
    This setup allows the same Google OAuth client to authenticate users for both your NetSapiens portal and Acrobits Signpost login page. Google may take up to a few hours for configuration changes to propagate globally.