Skip to content

chore(auth): Google sign-in on production #490

Open

Description

@allisonmahmood

Split from #480. HITL: Allison, in Google Cloud and the Clerk dashboard. Not a launch blocker: until this lands, production signs in with email codes.

Why

Clerk's shared Google credentials work only in development, so production needs Patchy's own Google OAuth client. Google is off on the production instance until then, so nobody sees a button that fails. The development instance keeps Google on Clerk's shared credentials.

Steps

  1. In Google Cloud, set up the OAuth consent screen: app name Patchy Cloud, audience External, authorized domain patchyhq.com, default scopes (openid, email, profile). Publish it to In production. While it's in Testing, only listed test users can sign in.
  2. Create an OAuth client: Web application, named Patchy Cloud.
    • Authorized JavaScript origin: https://cloud.patchyhq.com.
    • Redirect URI: https://clerk.patchyhq.com/v1/oauth_callback. Check that it matches Clerk's Google page.
  3. In the Clerk dashboard, open Patchy Cloud → Production → SSO connections → Google. Turn it on, choose custom credentials, and paste the client ID and secret there.

While you're in the dashboard (optional): Customization → Branding takes the logo and favicon, which the Platform API can't upload from the CLI. Use favicon.svg from the repo root, or a PNG of it (rsvg-convert -w 512 favicon.svg -o logo.png). If the page offers colors, match the first-party shell (packages/core/src/html.ts): primary #1263e6, background #fffdf4, text #12110f, radius 8px.

Done when

"Continue with Google" shows on https://accounts.patchyhq.com/sign-in, and an approved account signs in with Google.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions