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

# Google login

> Let customers sign in with their Google account.

![The OAuth app section of the Google login settings](https://mintcdn.com/dezerx/5Dcc9_tGN8Ne6sDs/public/providers/google/settings.webp?fit=max\&auto=format\&n=5Dcc9_tGN8Ne6sDs\&q=85\&s=a7deb2da4db78ec29d0517448f5d8a00)

## Create the Google app

**1. Pick a project**

Open the [Google Cloud console](https://console.cloud.google.com/apis/credentials) and select or create a project.

**2. Set up the consent screen**

Go to APIs and Services, OAuth consent screen. Enter the app name, a support e-mail and your domain, and publish the app so any customer can sign in.

**3. Create the credentials**

Go to Credentials, Create credentials, OAuth client ID. Choose Web application.

**4. Add the redirect URL**

Under Authorized redirect URIs paste the redirect URL from the Spartan settings page. It looks like this, with your own billing domain:

```text theme={null}
https://billing.example.com/auth/google/callback
```

**5. Copy the keys**

Copy the Client ID and Client secret.

## Fill in Spartan

Open Admin, Integrations, Modules, Sign-in providers and press Settings on Google.

| Field | Value |
| - | - |
| Show on the login page | On by default. Turn it off to hide the button without removing the keys |
| Client ID | From Google |
| Client secret | From Google. Once saved it is never shown again, leave the field blank to keep it |
| Redirect URL | Filled in with this site's callback URL. Press Copy and paste the same URL into Google |

Press Save settings. The Setup checklist on the right ticks off each step, and Details shows whether the button is shown and the redirect URL matches this site. Spartan asks Google for the openid, profile and email scopes.

> [!NOTE]
>
> The Google button only appears once a client ID and secret are saved, even if Show on the login page is on.

> [!NOTE]
>
> An existing account is only linked by e-mail when Google reports the address as verified.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.