---
locale: "en"
updated_at: "2026-11-26T12:55:45.910Z"
canonical: "https://www.isdecisions.com/en/userlock/docs/guides/configuration/register-google-cloud-app-oauth2"
---

# Register a Google Cloud app for OAuth2

The Google Cloud OAuth2 credentials UserLock uses to send email through Google.

## Before you begin

You need this only if UserLock sends email through Google with *Modern authentication (OAuth 2.0)*. It produces the **Client ID** and **Client secret** that you enter in the OAuth2 path of [Configure SMTP settings](/userlock/docs/guides/configuration/configure-smtp-settings#configure-smtp-with-oauth2) Guide.

Make sure you have:

- A Google account with the **Owner** or **Editor** role on the Google Cloud project you will use. Without one of these roles, the Google Auth Platform settings do not appear.
- Access to the [Google Cloud console](https://console.cloud.google.com/).

## Register the app and create the credentials

You create the OAuth2 credentials in your own Google Cloud project, then copy them into UserLock. Google maintains the console steps, so each step below links to Google's own documentation, which follows the reader's language.

1. Create a Google Cloud project, following [Create a Google Cloud project](https://developers.google.com/workspace/guides/create-project).
2. Configure your application on the Google Auth Platform (app name, user support email, audience), following [Configure OAuth consent](https://developers.google.com/workspace/guides/configure-oauth-consent). This one-time setup is required before you can create a client.
3. Create an OAuth client of type **Desktop app**, then copy the **Client ID** and the **Client secret**, following [Create access credentials](https://developers.google.com/workspace/guides/create-credentials#desktop-app).

> **Note**
>
> For a **Desktop app** client, Google does not ask for redirect URIs or JavaScript origins. Those fields belong to the **Web application** type, which UserLock does not use.

## Use the credentials in UserLock

Enter the credentials in the UserLock console on the server, as described in the Configure SMTP with OAuth2 section of [Configure SMTP settings](/userlock/docs/guides/configuration/configure-smtp-settings#configure-smtp-with-oauth2) Guide:

1. In **Server**, enter `smtp.gmail.com`.
2. In **Authentication**, select **Modern authentication (OAuth 2.0)**.
3. In **Client ID**, enter the Client ID.
4. In **Secret**, enter the Client secret.
5. Click **Sign in** and sign in with the account entered in **From**.
