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

# Google SSO for authentication

> Bolt integrates directly with Google to handle user authentication.

Google SSO (Single Sign-On) lets users sign in to your website using their Google account instead of creating a new account with an email and password. It provides a simple and secure way to log in, reducing the number of passwords people need to remember.

<Info>
  You need a Google account to set up Google SSO for your website.
</Info>

## How it works

Using your Google account, you'll create an OAuth 2.0 client in the Google Cloud Console, which generates a Client ID and Client Secret that identify your website to Google.

Then, you'll enter those values into Bolt's Authentication settings. After that, your visitors can sign in to your site securely using their Google account.

## Part 1: Enable Google SSO on your project

Before creating your Google credentials, complete the initial setup for Google SSO in Bolt.

1. Log in to Bolt and open your project.
2. Prompt Bolt to create a user authentication database to use with Google SSO. For example, as part of your prompt, include the following: `Add Sign-In with Google to my application.`

   <Info>
     You can't view Authentication settings in your project until you've created a Bolt database or connected to a Supabase project.
   </Info>
3. After Bolt creates your database, click the **gear icon** in the top center of your screen.
4. Click **All project settings**.
5. Click **Authentication**.
6. Click **Continue with Google**.
7. Turn on **Enable Google Sign In**.

After you enable Google sign-in, make note of the following information, as you'll need it in the Google Cloud Console:

* Your authorized JavaScript origin
* Your authorized redirect URI

<Frame>
  <img className="block mx-auto" src="https://res.cloudinary.com/dlq2nawz5/image/upload/v1760999017/auth-origins-redirects_fyuqgd.png" alt="Google SSO authorization settings in Bolt, showing the authorized JavaScript origin and redirect URI fields." />
</Frame>

## Part 2: Create your Google credentials

<Note>
  Google Cloud Console may look different depending on your account and setup. This guide shows a personal Google account without an organizational connection. For complete technical details, see Google's official guide on [Creating Access Credentials](https://developers.google.com/workspace/guides/create-credentials?utm_source=chatgpt.com#choose_the_access_credential_that_is_right_for_you).
</Note>

<Steps>
  <Step title="Go to the Google Cloud Console">
    Visit [https://console.cloud.google.com/](https://console.cloud.google.com/) and sign in with the Google account you want to use. If you're new to the console, you may need to agree to their terms first.
  </Step>

  <Step title="Create or select a project">
    <Frame>
      <video className="block mx-auto" src="https://res.cloudinary.com/dlq2nawz5/video/upload/f_auto,q_auto/v1761011364/google-sso-create-credentials_bn8yzt.mp4" alt="Creating a new project in the Google Cloud Console" controls autoPlay muted loop />
    </Frame>

    1. Click **Select a project** in the top-left of your screen.
    2. Click **New project** in the top-right corner of the window (or select an existing one).
    3. Enter a project name or use the default.
    4. Select your organization.
    5. Click **Create**.
    6. Click **Select project** when your new project shows up as a notification.
  </Step>

  <Step title="Enable the Google Identity Service">
    1. Click **Go to APIs overview**.
    2. Click **OAuth consent screen**.
    3. Click **Get started**.
    4. Enter your app name and select a user support email, then click **Next**. (The email must be connected to your Google account; you cannot manually enter one.)
    5. Select **External**.
    6. Enter a contact email. (This does not have to be connected to your Google account.)
    7. If you agree to the terms, select the checkbox, then click **Create**.
  </Step>

  <Step title="Create OAuth credentials">
    <Frame>
      <video className="block mx-auto" src="https://res.cloudinary.com/dlq2nawz5/video/upload/v1761011360/google-sso-enable-oauth_qav5kx.mp4" alt="Enabling OAuth and creating client credentials in the Google Cloud Console" controls autoPlay muted loop />
    </Frame>

    1. Click **Create OAuth client**.
    2. Select **Web application**.
    3. Enter a name for your credentials (not shown to end users).
    4. Click **Add URI** under Authorized JavaScript origins.
    5. Enter your origin URI found in your **Authentication > Google** settings from Part 1 of this guide, for example `https://your-app-name.bolt.host`.
    6. Click **Add URI** under Authorized redirect URIs.

           <Tip>
             You may need to add multiple origin or redirect URIs depending on your project domain configurations.
           </Tip>
    7. Enter the redirect URL found in your **Authentication > Google** settings from Part 1 of this guide, for example, `https://loremipsumexample.supabase.com/auth/v1/callback`.
    8. Click **Create**.
  </Step>
</Steps>

## Part 3: Enter your Google credentials in Bolt

After creating your Google SSO credentials, enter your Client ID and Client Secret into your project's Authentication settings.

<Steps>
  <Step title="Copy your Google Client ID and Client Secret">
    1. Under the Client ID column, click the **copy icon** next to your Client ID and save it.
    2. Click your project name to open it.
    3. Under Client secrets, click the **copy icon** next to your Client secret and save it.
  </Step>

  <Step title="Enter values into Bolt">
    1. Log in to Bolt and open your project.
    2. Click the **gear icon** in the top center of your screen.
    3. Click **All project settings**.
    4. Click **Authentication**.
    5. Click **Continue with Google**.
    6. Paste in your **Google Client ID** and **Client Secret** in the appropriate fields.
  </Step>
</Steps>

## Part 4: Test your app

Google's OAuth flow blocks iframes, so you need to test using your published site rather than in the Bolt Preview window.

1. In Bolt, [publish your project](/cloud/hosting/publish) to make the latest version live.
2. Open your published site in a new tab.
3. Sign in with a Google account to confirm everything is working.
