Skip to main content
Allow users to sign in with their Google accounts.

Prerequisites

Setup

1. Create OAuth Credentials

  1. Go to the Google Cloud Console
  2. Select or create a project
  3. Navigate to APIs & Services > Credentials
  4. Click Create Credentials > OAuth client ID
  5. If prompted, configure the OAuth consent screen first:
    • Choose Internal to restrict sign-in to your Google Workspace organization only
    • Choose External to allow any Google account to sign in
  6. Select Web application as the application type
  7. Add authorized redirect URI:
  8. Click Create
  9. Copy the Client ID and Client Secret

2. Configure pgconsole

Add the Google provider to your pgconsole.toml:
pgconsole.toml
See OAuth Providers in the configuration reference for all provider fields.

3. Restart pgconsole

Restart the application for changes to take effect. A “Sign in with Google” button will appear on the login page.