How Google login works in Zitadel
A team running a self-hosted Zitadel that wants customers or staff to sign in with Google treats Google as an upstream identity provider. Zitadel federates the login: the user authenticates at Google, Google returns an identity to Zitadel, and Zitadel issues its own tokens to your applications. The setup has three parts that must match: an OAuth client created in Google, a redirect URI registered on that client that points back to your Zitadel domain, and a choice of scopes that determines which profile data Zitadel can read at first login. Zitadel lists Google among its documented identity providers, alongside OIDC and SAML options, so Google is a supported path rather than a custom build.
The exact configuration fields, the redirect URI format and the names of the Console screens change between releases, so confirm them against the identity provider documentation for the Zitadel version you run before you build anything. The same applies to Google's own OAuth client requirements, such as consent screen settings and whether your app is internal or external. Ask whether the Google provider can be defined at instance level, which every organization inherits, or at organization level, which limits it to one customer. That choice decides who can see the Google button and who can change its settings, so it belongs in the design review before the client secret is created.
Plan for the account question early. Zitadel can create a new user the first time someone signs in with Google, or link the Google identity to an existing user. Which behavior you pick affects duplicate accounts, support load and how much you trust the email address Google returns. Also decide who holds the Google client secret and how it is rotated, because a secret stored in the wrong place becomes a standing access risk. Test with a non-production instance and a second Google account before any customer is switched on.
What you need before configuring Google login
Google login depends on a working Zitadel instance, the right administrative access, and a Google Cloud project where OAuth credentials can be created. Each item below is a decision or check to settle before you open the Zitadel console, because a mismatch in any one of them usually surfaces later as a failed redirect or a provider created at the wrong level.
A reachable self-hosted instance
Confirm that your self-hosted Zitadel is running on its public domain over HTTPS, and that the browser can reach the login and console pages from outside your network. Google redirects users back to Zitadel, so an instance that only resolves on an internal name will fail at the callback step. Confirm the Zitadel version against the releases page before you start, since the console screens and provider options can change between releases. The database and deployment method should already be settled and stable.
Zitadel releasesInstance-level administrator access
Google login can be added at instance level or organization level, and instance-level providers are configured by an administrator with rights on the instance. Confirm which accounts hold that role and that they can sign in to the console without depending on Google itself. Keep at least one break-glass administrator with a local login so a misconfigured provider cannot lock everyone out.
A Google Cloud project for OAuth
Someone on your team needs permission to create OAuth credentials in a Google Cloud project. Decide which project owns the client, who can change it, and whether it sits in the same account as your other Google Workspace or consumer integrations. Confirm the consent screen settings, including the audience type and the app name users will see, before you need the credentials in production.
The agreed organization structure
Write down which organizations exist in the instance and which of them should accept Google sign-in. A provider added at instance level is available across organizations, while one added at organization level applies only to that customer or team. Agree this before configuring, because it determines where the provider lives and who can manage it later.
The public callback URL
Zitadel builds the redirect URI from its external domain, and Google must have that exact address registered as an authorized redirect. Record the external domain, scheme and path that your instance advertises, and check that they match what you will enter in Google Cloud. A trailing slash, an http scheme or a mismatched subdomain are common causes of Google returning a redirect error.
Account linking policy
Decide ahead of time whether a Google sign-in should create a new user, link to an existing account with the same verified email, or prompt the user to confirm the link. This choice affects how duplicate accounts are avoided and what your support team sees when a user reports a missing profile. Document the policy so the provider settings reflect a decision rather than the default.
Request flow for a Google sign-in
The sign-in starts in the user's browser at the Zitadel login page, which sends the browser to Google's authorization endpoint with the client ID and the redirect URI registered for the Google provider. After the user approves, Google redirects the browser back to Zitadel's callback URL with an authorization code, and Zitadel exchanges that code for Google's tokens and user claims. Zitadel then either creates a new user or links the Google identity to an existing one, and only after that step issues its own tokens to the application. Check that the redirect URI in Google matches Zitadel's callback exactly, and that the linking behavior matches your policy.
The browser moves between Zitadel and Google before Zitadel links the user and issues its own tokens.
Configure the Google OAuth client and Zitadel provider
This sequence creates a Google OAuth client, registers it in Zitadel as a Google identity provider, and proves that a non-administrator can sign in and receive a usable identity. Each step ends with a check so the team knows the configuration is correct before moving on.
Confirm the Zitadel domain and redirect URI
Before touching Google, the platform owner confirms the public domain that users reach Zitadel on, because Google will only redirect to an exact address. Open the Google provider configuration in Zitadel at the level you intend to use, either instance or organization, and copy the redirect URI it displays. Check that the host in that URI matches the external domain your self-hosted Zitadel is served from, including the scheme. A mismatch here is the most common cause of a failed callback later, so resolve it now.
Create the OAuth client in Google Cloud
In the Google Cloud project your organization controls, configure the OAuth consent screen and create an OAuth client of the web application type. Paste the redirect URI copied from Zitadel into the authorized redirect URIs list exactly as shown, without a trailing slash unless Zitadel displays one. Google requires the consent screen to be set up before the client can be used, so confirm the app name, support contact and audience settings your security team expects. The step is done when Google issues a client ID and client secret for this application.
Register the client ID and secret in Zitadel
Enter the client ID and client secret from Google into the Google identity provider form in Zitadel. Store the secret only in the system that Zitadel administrators can access, and record who holds it so rotation can be scheduled later. Save the provider and confirm it appears as active in the identity provider list for the chosen scope. The check is that the provider shows as configured and that the login page for the organization or instance now offers a Google option.
Choose the Google scopes for profile and email
Review the scopes requested from Google in the Zitadel provider settings. The sign-in needs the OpenID scope along with profile and email so Zitadel receives the claims it uses to name the user and match the email address. Request no more scopes than the login needs, and document the choice so the security review can see what data crosses the boundary. Confirm the scopes against the Zitadel identity provider documentation for your version, since defaults and field names can change between releases.
Decide how new Google users are handled
Set the automatic creation and linking options for the provider so the behavior matches your policy before the first test. Automatic creation makes a Zitadel user at first login, while linking connects a Google identity to an existing user that has the same verified email. Choose these settings deliberately, because they determine whether a stranger with a Google account in an allowed domain can create a user. Record the chosen behavior so the test in the next step can be checked against it.
Test sign-in with a non-administrator account
Use a regular test user, not an instance or organization administrator, and start a login from a test application that uses Zitadel. Choose Google on the login page, complete the Google consent, and watch for the callback returning to Zitadel without an error. Confirm that a user record exists or was linked as you intended, and inspect the resulting ID token for the expected email claim. If the callback fails, compare the redirect URI and client secret first, then the scopes. The step closes when the token contains the email address of the test account.
Instance-level or organization-level Google login
An instance-level Google provider is available to every organization inside the Zitadel instance, so it suits a single consumer or workforce login experience where one Google sign-in serves all users. It is managed by administrators with instance-level rights, which means the people who can change it are a small group in your platform or identity team. Because the provider is shared, any change to its client, scopes or auto-creation behavior affects every organization at once.
- Reach: every organization in the instance can offer Google as a login method, subject to its login policy.
- Administration: only instance administrators can create, edit or remove the provider.
- Consumer fit: a single Google client and one login page work well for a public app with one user base.
- Blast radius: a misconfigured client or redirect URI breaks Google login for all tenants.
- Auto-creation: new Google users created at instance scope land in the instance's default structure, so check where they end up.
Before you choose this scope, confirm with the identity provider documentation how instance login policies decide which providers appear for each organization.
An organization-level Google provider is registered inside one organization and is offered only to users who sign in through that organization. This suits B2B tenants that want Google sign-in limited to their own workforce or customer users, while other tenants keep their own identity sources. Organization administrators can often manage this provider within the rights granted to them, which lets a tenant change its own settings without touching the instance.
- Reach: only users routed to the organization can see the Google option.
- Administration: delegated organization administrators can manage the provider within their granted rights.
- Isolation: a problem in one tenant's Google setup does not affect other organizations.
- Routing: the organization's login policy and domain handling decide whether users reach the Google button.
- Scale: each tenant maintains its own provider entry, which adds administration as the number of tenants grows.
Confirm the exact delegation and login policy settings in the identity provider documentation before you grant organization administrators these rights.
A single Google OAuth client can often serve several scopes, but reuse has consequences for consent screens, redirect URIs and audit. Reusing one client keeps setup simple and gives one place to rotate the secret. Separating clients per scope limits what a compromised or misconfigured secret can affect and makes it clearer which tenant or environment a sign-in belongs to. The decision should be made before the first user signs in, because changing the client later means updating redirect URIs and re-testing every login path.
- Reuse: one client with the correct redirect URIs for each Zitadel domain is the simplest option for an instance-level provider.
- Separation: distinct clients per organization or environment reduce shared-secret risk.
- Redirect URIs: every domain and path that handles the callback must be registered on the client you choose.
- Secret handling: store each client secret in your secrets system, and record which provider entry uses it.
- Rotation: plan how a secret change propagates to each provider entry without a login outage.
Ask your Google administrator and your security team which option matches your tenant model, and verify the final redirect URI list in a test instance first.
How Google claims map to Zitadel user fields
This table compares the common Google OIDC claims with the Zitadel user fields they populate and the attribute Zitadel uses to decide whether a login creates a new user or links to an existing one. Read the matching row first, because it determines whether a second Google login can attach to an account that already exists. Confirm the automatic creation and linking settings in your installed version before you rely on them.
| Google claim | Zitadel user field | Matching and linking notes |
|---|---|---|
| sub (subject identifier) | External user ID for the Google identity link | Stable per Google account and per OAuth client. Zitadel stores it as the external identity, so it is the value to trust for returning users, not the email address. |
| Email address on the user profile | Used as the candidate match for linking to an existing user. Confirm in your version whether Zitadel matches on email automatically or only after the user confirms. | |
| email_verified | Email verified status | Only a true value should allow linking to an existing account by email. Check how your version treats an unverified email from Google before enabling automatic linking. |
| given_name | First name in the profile | Usually prefilled at first login when automatic creation is on. Users can often edit it, so treat it as a default rather than an authoritative record. |
| family_name | Last name in the profile | Prefilled in the same way as the first name. Some accounts omit it, so confirm the profile form still requires the field in your configuration. |
| picture | Profile photo URL | Often copied or referenced at login. Confirm whether your version stores the image or only the URL, and whether it refreshes at later logins. |
| Automatic creation at first login | New Zitadel user with the Google identity linked | Applies when no existing user matches. Confirm for your installed version whether creation is enabled at instance or organization level and whether a registration form is shown first. |
| Linking to an existing user | Google identity added to a user already in the organization | Depends on a matching email and the verified flag. Confirm whether linking is automatic or requires the user to sign in with the existing account first, and test both paths. |
Migrating an existing generic OIDC Google provider without losing links
Organizations often add Google first as a generic OIDC provider and only later need the dedicated Google provider type. The migration is safe only if you treat existing external identities as the thing to protect. In Zitadel, a user's link to an external account is recorded against the identity provider it was created through and the subject value that provider returned, so changing or replacing the provider record can leave existing users with a login that no longer matches a linked account. Before you change anything, decide whether the new provider will keep the same provider identifier and whether the subject values Google returns will be mapped identically. Confirm both behaviors in the current Zitadel identity providers documentation and in a test run, because the answer determines whether the cutover is a simple switch or needs a relinking plan.
Start with an inventory. Query or export the users linked to the generic Google provider, including the instance or organization where the provider is configured, the userId of each Zitadel account and the external user identifier. Count them and note which accounts are service or administrative users that must keep working. Then take a copy of the instance, or a staging deployment restored from a database backup, and configure the Google provider there. Sign in with at least one account from each organization and check that each lands on the same Zitadel user record and not on a newly created one. Test automatic creation and linking separately, since a new provider with automatic creation enabled can produce duplicate accounts if the link does not match.
Sequence the production cutover so that you can stop and roll back. Schedule a window, announce it to users, freeze provider configuration changes, and take a database backup immediately before the change. Apply the change at the level where the provider lives, instance or organization, and keep the old generic provider disabled rather than deleted until verification is complete. After cutover, sign in with a sample from each organization, confirm the Zitadel user ID is unchanged, check the audit trail for unexpected user creation, and confirm that the Google OAuth client and redirect URI match the environment. Keep the old configuration and backup until users have signed in successfully over a period you agree with the business owners. If the test shows that links break, stop and plan a relinking process instead of forcing the switch.
Security settings for a Google provider
A Google provider lets anyone with a Google account reach your login page, so its configuration is a security boundary. The five controls below cover who can change the provider, how its secret is stored, when accounts are created or linked, which Google accounts may sign in, and how changes are traced.
Restrict who can edit providers
Changing a Google provider's client ID, secret, or auto-creation setting changes who can get into your instance or organization. Decide which administrator roles may create, edit, or delete identity providers, and keep that set small. Check that instance administrators and organization administrators are not granted provider rights by default, and confirm the role grants with a test admin account before go-live.
Identity provider docsProtect the Google client secret
The OAuth client secret from Google Cloud is a credential that lets your instance request tokens on behalf of the Google client. Store it in your secret management system, not in configuration files, scripts, or tickets, and limit who can read it after it is entered. Plan a rotation step in Google Cloud and Zitadel together, and confirm how your deployment supplies the value to the admin console or API.
Limit automatic account creation
When automatic creation is on, a first Google sign-in can create a new user in your organization. Enable it only when you trust the verification of the email address Google returns, and check how Zitadel handles unverified addresses in your version. Where you cannot rely on verification, require users to link an existing account instead. Test one sign-in with an unverified address before you decide.
Restrict permitted Google accounts
A Google OAuth client accepts any Google account unless the configuration narrows it, so a consumer Gmail address can reach a workforce login. Decide whether sign-in should be limited to a Google Workspace domain or a list of accounts, and confirm whether your Zitadel version enforces that restriction on the provider itself or only through login policy or domain checks. Test with an account outside the domain.
Review provider change audit records
Changes to identity providers should appear in your audit trail with the actor, the time, and the object changed. Confirm that create, update, and delete events for the Google provider are recorded and forwarded to your log store, and set a review step for them. Retain these records under your own policy, since the audit trail is only useful if someone reads it.
Why Google login fails in Zitadel and how to fix it
This table lists the failures teams most often hit when adding Sign in with Google to Zitadel, with the cause and the fix for each. Read it before testing, and again when a user reports that login fails or creates a second account. The main takeaway is that most failures trace to three places: the redirect URI, the public domain, and the Google consent and scope settings.
| Failure | Likely cause | Fix |
|---|---|---|
| Redirect URI mismatch | The callback URL registered in the Google OAuth client does not exactly match the redirect URI Zitadel generates for the Google provider | Copy the redirect URI from the Zitadel Google provider settings and paste it into the Google OAuth client, character for character, including scheme and path |
| Login fails on the public domain | Zitadel was reached through a domain that differs from the configured external domain, so the generated callback points somewhere else | Set the external domain and port to the public address users actually use, then re-register the redirect URI in Google to match |
| Users outside the test list are blocked | The Google consent screen is still in testing mode, which only allows listed test users | Confirm the publishing status of the consent screen and move it to production, or add the affected accounts as test users while you verify |
| No email returned at login | The email scope was not requested, so Zitadel receives no email claim and cannot match or create the user by email | Add the email scope to the Google provider configuration and confirm the claim arrives in a test login |
| Duplicate accounts after first Google login | Automatic linking to an existing verified email was off, so Google created a new user rather than linking the existing one | Enable linking for verified emails on the provider, then test with a user who already exists locally |
| Existing links break after provider change | The Google provider was replaced with a new generic OIDC record, so previously linked identities no longer match the provider ID | Keep the original provider record, or migrate links deliberately before retiring the old record. Test with a copy of production data first |
Questions buyers ask about Google login in Zitadel
How much effort does adding Sign in with Google to Zitadel take?
The core setup is short: you create a Google OAuth client, register the Zitadel redirect URI, enter the client ID and secret in Zitadel, and test a login. Effort grows with the decisions around it. Those include whether the provider sits at instance or organization level, whether new users are created automatically or must link to an existing account, how consent screen settings are handled in your Google Cloud project, and how the login is tested across browsers and accounts. Teams that already run Zitadel and have a Google Cloud project can usually complete the basic path in-house. Ask any partner to show the written steps for each of these decisions before you agree on effort.
What drives the cost of an outside implementation of Google login?
Cost follows the number of decisions and environments, not the Google button itself. The main drivers are how many Zitadel instances and organizations need the provider, whether each organization brings its own Google settings, how account linking and fallback to local login must behave, whether existing users from a generic OIDC Google provider must be migrated, and how many environments (development, staging, production) need the change. Recurring costs are usually limited to any ongoing support you buy, since Google login itself has no per-user fee from Zitadel. Ask for a quote that lists each deliverable, the environments covered, the testing scope and what is excluded.
Can our team set up Google login in Zitadel without a partner?
Yes, a team with administrator access to Zitadel and a Google Cloud project can usually do the core setup alone. The work that tends to need outside help is designing the rules for linking accounts, planning migration of an existing Google provider without breaking user links, and testing edge cases such as users who sign in with a different Google account than the one on file. Before starting, confirm who controls the Google Cloud project, who owns the OAuth consent configuration, and who approves changes to production identity settings. Those answers decide whether an internal build is practical.
How long does a Google login project typically take?
The duration depends on scope rather than on a fixed number. A single instance with one Google provider and a tested redirect URI is a small change. Per-organization providers, linking rules, a migration from a generic OIDC provider and approval cycles in your own change process add time, and so do Google-side review steps when the consent screen changes. This page does not give a duration figure. Ask a partner for a timeline built from a written scope, with milestones for design, build, testing and cutover, and with the dependencies you must provide listed separately.
What must our team provide before the work starts?
You need to supply a running self-hosted Zitadel environment with administrator access, a Google Cloud project where you can create OAuth credentials, the public domain and TLS setup that Zitadel uses for its redirect URI, and a list of the organizations or customers who will use Google login. You also need a decision on account linking behavior, a test set of Google accounts, and a named approver for production changes. Confirm which of these your own team already holds, because missing access is the most common cause of delay in a fixed-scope engagement.
How does migrating a generic OIDC Google provider differ from a fresh setup?
A fresh setup creates a new provider and starts linking users at their next login. Migrating an existing generic OIDC Google provider requires keeping the existing user links intact, so users keep their accounts and roles. The main risks are duplicate accounts if the linking key changes, users who lose access during cutover, and mismatched provider identifiers across instances. The migration plan should include a test with real linked accounts in a non-production instance, a rollback path and a check that every linked user still resolves to the same Zitadel user afterward. Ask for the migration approach in writing before you approve any change to production.
Does adding Google login change our Zitadel license or support tier?
Adding an identity provider does not change which Zitadel license applies to your deployment. Zitadel's core, Console and hosted login are licensed under the GNU Affero General Public License 3.0 from version 3.0, while APIs, SDKs and Helm charts remain Apache 2.0, as stated in the Zitadel blog post on the license change. Support is separate. Zitadel's pricing page describes custom support agreements and technical account management on its Enterprise plan. Confirm with Zitadel which support level you hold, and ask any partner to state in writing that the work does not alter your license or support terms.
How DeployOpen scopes and delivers Google login for Zitadel
DeployOpen plans and builds Google login in your own Zitadel deployment, at instance or organization level, with the OAuth client, redirect URI and account linking rules agreed in writing before work starts. The engagement is fixed-scope, and the handover leaves your team able to run and change the setup.
How we scope
- We confirm whether Google sign-in belongs at instance level or in specific organizations, and which customers or workforce groups will use it.
- We record the Google Cloud project, OAuth consent configuration and the Zitadel domains that the redirect URI must match.
- We agree in writing how new Google users are created or linked, and what happens when an existing local account has the same email address.
How we build
- We create the Google OAuth client in your Google Cloud project and register the Zitadel redirect URI exactly as your deployment serves it.
- We configure the Google identity provider in Zitadel, including the automatic creation or linking behavior agreed during scoping.
- Where an existing generic OIDC Google provider is in use, we plan the migration so that existing user links are preserved before any change is made.
How we hand over
- We test sign-in with Google for new users, returning users and users who already have a local account, and record the results.
- We document the OAuth client settings, redirect URI, provider configuration and linking rules so your team can audit and change them.
- We walk your administrators through the procedure for rotating the Google client secret and adding a new organization later.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, covering Zitadel version changes that affect the login flow.
- We can retest the Google login path after Zitadel upgrades, Google OAuth changes or changes to your domains or redirect URIs.
- Support scope and response arrangements are written into the retainer agreement, and you receive a quote based on that written scope.

