← Docs

Enterprise · At home

DIY: SSO & Sign-in with Google

You don’t need a corporate IdP to use Parleq’s OIDC sign-in. The same engine works for a single person on a free identity provider or a personal Google account — no per-user API keys, no long-lived cloud secret on disk.

Who this page is for: hobbyists and geeks wiring this up without an IT department — probably with an AI assistant open in another window. This stuff is fiddly, and the console UIs change constantly. So this page gives you the route map and the gotchas that burn hours; your assistant fills in the exact console-clicking for whatever the current UI looks like. The section at the bottom on working with your AI assistant is the intended workflow, not an afterthought.

Setting this up for a company instead? The IT-admin version — Okta / Entra ID / any OIDC IdP, with MDM pins — lives in Enterprise SSO.

Pick your path

Three routes, all roughly $0 — Cognito’s free tier (10,000 monthly active users on the default Essentials plan), OAuth, STS, and Workforce Identity Federation carry no service charge at personal scale. You pay only for the LLM tokens you use. Start at the top.

Path What it needs Effort
A. Sign in with Google → Vertex / Gemini Recommended start A GCP project. No broker, no STS, no organization. The simplest thing that works. Lowest
B. Cognito → AWS Bedrock A free Cognito user pool as your personal IdP; an IAM role assumed via AssumeRoleWithWebIdentity. Medium
C. Cognito → GCP Workforce Federation → Vertex Everything in B, plus a Google Cloud organization (Cloud Identity Free + a domain you own). The heaviest path. Highest

Choose A unless you have a specific reason not to. Choose B if you want Bedrock (Claude / GPT-OSS) and are comfortable in the AWS console. Choose C only if you specifically want the federation architecture — it needs a GCP org, which is the single biggest step on this whole page.

Path A — Sign in with Google → Vertex

“Sign in with Google, dictate with Gemini.” No broker, no Workforce Identity Federation, no gcloud CLI. GCP refuses to accept Google itself as a workforce IdP, so federation can’t do this — instead Parleq’s own Google sign-in requests the cloud-platform scope, and the resulting OAuth access token is a valid Vertex bearer directly (exactly what gcloud ADC produces, done in-app). No GCP organization required.

  1. 1.

    Create a GCP project and enable the Vertex AI API.

    Any project works. Enable Vertex AI API from the API Library, and note the Project ID (the ID, not the display name).

  2. 2.

    Create an OAuth client — of the iOS type.

    This is the non-obvious one. Parleq’s sign-in uses a custom-scheme redirect, so create an iOS-type OAuth client (public, no secret) and use its reversed client ID as the redirect scheme. A Desktop-type client with a loopback redirect is on the roadmap but not the path today.

  3. 3.

    Grant IAM on the project.

    The signing account needs roles/aiplatform.user and roles/serviceusage.serviceUsageConsumer on the project. If you’re the project Owner, you already have both.

  4. 4.

    Write the config.

{
  "oidc": {
    "issuer": "https://accounts.google.com",
    "client_id": "123456789-abc.apps.googleusercontent.com",
    "scopes": ["openid", "email", "https://www.googleapis.com/auth/cloud-platform"],
    "redirect_uri": "com.googleusercontent.apps.123456789-abc:/oauth2redirect",
    "extra_auth_params": { "access_type": "offline", "prompt": "select_account consent" }
  },
  "vertex": {
    "project": "your-project",
    "region": "us-central1",
    "auth_mode": "googleOAuth"
  }
}

Why "prompt": "select_account consent" is the default to use, not just "consent": select_account prevents a dead-end where Google silently reuses whatever account is active in the browser and hard-blocks the sign-in without ever showing an account picker. consent guarantees Google re-issues a refresh token (it only does so when it shows the consent screen). Together they make sign-in reliable across the consent-screen modes below.

The consent-screen trilemma

This is the #1 source of confusion. Your OAuth consent screen is in one of three publishing states, and each has a different trade-off:

Pragmatic call: start in Testing to prove it works, then go Internal only if you already want a GCP org for other reasons. Otherwise Publish (External) and click past the warning if weekly re-sign-in annoys you — it’s your own client; see why that’s safe above.

Gotcha that burned us live — tick the box. Google’s granular-consent screen shows “See, edit, configure and delete your Google Cloud data” as an unchecked checkbox. If you don’t tick it, you get a working sign-in whose token then 403s at Vertex — and the next silent refresh may sign you out entirely. Parleq now detects a missing grant at sign-in and tells you, but the fix is simple: tick the box on the consent screen.

Path B — Cognito → AWS Bedrock

A free Amazon Cognito user pool becomes your personal OIDC issuer; an IAM role trusts it via AssumeRoleWithWebIdentity. Cognito gives you an AWS-hosted public issuer with a publicly-fetchable JWKS, so the AWS leg works with nothing exposed to the internet yourself. The free tier covers far more monthly active users than a single person will ever use — but note the tiers: 10,000 MAU free is the default Essentials plan, the Plus plan has no free tier, and SAML/OIDC-federated users get only 50 free MAU (aws.amazon.com/cognito/pricing).

{
  "oidc": {
    "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EXAMPLE",
    "client_id": "EXAMPLEcognitoclientid",
    "scopes": ["openid", "email"]
  },
  "aws": {
    "region": "us-east-1",
    "auth_mode": "oidc",
    "role_arn": "arn:aws:iam::<account>:role/ParleqDictation"
  }
}

The trust-policy and permissions-policy shapes are in Enterprise SSO → AWS Bedrock setup — the same JSON, just with your Cognito issuer as the federated principal.

Path C — Cognito → GCP Workforce Federation → Vertex Advanced

This is the full federation architecture for Vertex, and the heaviest path on the page. Choose it only if you specifically want workforce federation — Path A reaches Vertex with far less ceremony. The blocker is that Workforce Identity Pools are an Organization-level GCP resource, so you need a Google Cloud org first.

Full workforce-pool details (attribute mapping, the x-goog-user-project billing requirement) are in Enterprise SSO → Google Cloud Vertex AI setup.

Working with your AI assistant

This page is the map; your assistant is the turn-by-turn navigation. The console UIs move around too fast for any doc to keep exact click paths current, but an assistant can generate them for whatever you’re looking at right now.

Troubleshooting

Symptom Cause / fix
“Unverified app” warning at sign-in Expected on a Published/External Google client requesting the restricted cloud-platform scope. Click Advanced → continue — harmless for your own personal client.
“App can only be used within its organization”, and no account picker appeared Google silently reused the active browser session. Add "prompt": "select_account consent" to extra_auth_params so it always shows the picker.
403 at Vertex after a successful sign-in Either you didn’t tick the granular-consent checkbox (re-sign-in and tick it), or the signing account is missing roles/aiplatform.user + roles/serviceusage.serviceUsageConsumer on the project.
Signed out shortly after signing in The refresh was rejected — usually a partial grant (missing the consent checkbox) or a Testing-mode client whose 7-day refresh token expired. Re-sign-in; tick the box; consider Publishing the consent screen.
Cognito sign-in window flashes open and shut instantly invalid_scope — you requested a scope the app client doesn’t have enabled. Drop profile (and don’t request offline_access); use ["openid", "email"].
GCP workforce provider create fails: “issuer must be HTTPS” Path C’s issuer must be public HTTPS. A localhost IdP can’t work even with inline JWKS — use the Cognito issuer (it’s public HTTPS).

† Third-party pricing, free tiers, and quotas are set by the providers — AWS, Google, Microsoft, Okta, and others change them without notice. Cost statements here were accurate when written; verify current rates on the provider's pricing page before you build.