Strapi admin SSO with Google Workspace

Plan and configure Google Workspace sign-in for Strapi administrators, with domain restriction, a safe default role and a tested fallback. Learn what the work needs from your team.

On this page

Strapi admin SSO with Google Workspace: what the integration does

Editors should sign in to the Strapi admin panel with their Google Workspace accounts instead of local passwords that someone has to create, rotate and revoke by hand. This page covers how to make that happen for administrator login. Strapi's SSO feature applies only to administrator access to the admin panel through an identity provider. It does not decide how front-end users or customers log in to your application. That is a separate concern handled by the Users and Permissions plugin, so the Google setup described here will not change who can read or call your public API.

The Google sign-in is built on the passport-google-oauth2 strategy, which Strapi's SSO configuration loads when you enable the Google provider. Your Google Cloud OAuth client, its callback URL and the Strapi settings have to agree exactly, or the sign-in loop fails before any editor gets in. Before you start, confirm the exact provider options and callback format in the current Strapi SSO documentation for your Strapi 5 version, since the admin SSO settings are the part of the product most likely to change between releases.

Three decisions shape the result. The first is domain restriction: you decide which Google accounts are allowed to sign in, so that only addresses under your Workspace domain can reach the admin panel. The second is the default role for new admins: when auto-registration creates an admin account on first sign-in, that account receives a role you have chosen in advance, and that role should be the least privileged one that still lets the person do their job. The third is the local login lock-out: once SSO works, you can decide whether the email and password form stays available as a fallback. Keeping it open preserves an emergency path if Google is unavailable, but it also leaves a second way in that your identity team does not manage.

Each decision has a verification step. Test sign-in with an account from outside your domain, confirm the default role on a freshly created admin, and test the lock-out from a clean browser session before you rely on it. Ask your security team to record which group owns the Google OAuth client and who can rotate its secret, because that person controls the admin login path.

What you need before you configure Google sign-in

Google sign-in for the Strapi admin panel depends on four things lining up: the right Strapi edition and plan, a supported Strapi 5 stack, a Google Cloud project you can configure, and a public HTTPS admin address for the callback. Missing any one of them usually surfaces late, after the team has already built the rest of the configuration.

Strapi plan that includes SSO

SSO for the admin panel is an add-on on the Growth plan and included in Enterprise, so a Community Edition install cannot use it as shipped. Confirm the plan and the add-on price on Strapi's self-hosted pricing page before you scope the work, and check that your licensing terms cover the code you will run. The SSO add-on must be purchased or confirmed before configuration begins.

Self-hosted pricing

Supported Strapi 5 stack

Confirm the project runs Strapi 5 on a supported database: PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later, or SQLite 3. MongoDB is not supported. Also confirm the Node.js line is Active or Maintenance LTS. A v4 project must be upgraded first, because v4 reached end of life and SSO work should not target a version that no longer receives updates.

PostgreSQL minimum
14+
Installation requirements

Google Cloud project and OAuth client

You need a Google Cloud project where you can configure the OAuth consent screen and create a web application OAuth client with a client ID and secret. The consent screen decides whether the app is internal to your Workspace or open to external accounts, which affects who can sign in at all. Confirm the current consent screen and client steps in Google's own documentation, since Google changes these screens over time.

Workspace admin rights

Someone with Workspace super admin rights, or a delegated owner who can manage the Google Cloud project under your organization, must approve the internal app and confirm the domain. Without that access, the team ends up waiting on a ticket during the configuration window. Agree up front who will create the client, who holds the secret, and who signs off on the domain restriction you plan to enforce.

Public HTTPS admin URL

Google redirects the browser back to the Strapi admin callback after sign-in, so the admin panel needs a stable public HTTPS address that matches the redirect URI registered in Google. Localhost and changing preview hostnames break the flow. Confirm the final admin domain, its TLS certificate and any reverse proxy routing before you register the redirect URI, because changing the domain later means updating the OAuth client and Strapi settings together.

Break-glass local admin

Before you enable SSO, keep at least one local administrator account that can sign in with email and password. If the Google client is misconfigured, the domain restriction blocks everyone, or the identity provider is unavailable, that account is the only way back into the admin panel. Decide who holds it, where the credential is stored, and whether local login will later be locked out once SSO is verified.

How to configure Google Workspace sign-in for Strapi admins

This sequence takes a Strapi admin panel from local login only to Google Workspace sign-in limited to your own domain, with a default role for new administrators. Each step ends with a check that confirms the setting works before the next one starts.

  1. Confirm plan, version and hosting

    Your platform engineer confirms that the Strapi project is self-hosted, that the SSO feature is available on the plan your organization has chosen, and that the Strapi version in use is one that supports the admin SSO configuration you plan to apply. Strapi SSO is an add-on for the Growth plan and included in Enterprise, so check the current terms on the self-hosted pricing page before you rely on it. Confirm the public URL of the admin panel, because every later setting depends on it. Done when the team can name the plan, the Strapi version and the exact admin URL in writing.

  2. Create the Google OAuth client

    A Google Cloud administrator creates an OAuth client for a web application in the project your organization controls, and sets the authorized redirect URI to the Strapi admin callback URL built from your admin URL. Keep the consent screen configured for internal use if your Workspace allows it, so only accounts in your organization can authorize the app. Record the client ID and client secret in your secrets manager, not in the repository. Done when the OAuth client shows the callback URL exactly as your Strapi admin will call it, with no trailing slash differences.

  3. Install and configure the passport-google-oauth2 provider

    A Strapi developer installs the passport-google-oauth2 strategy in the project and adds the provider settings to the admin SSO configuration, reading the client ID and client secret from environment variables. Use the environment names your deployment tooling already injects, and confirm that the secret is not written into configuration files or build output. Restart Strapi in a non-production environment and open the admin login page. Done when the login page offers Google sign-in and the button reaches Google's consent screen without an error from Strapi.

  4. Restrict sign-in to your Workspace domain

    The developer sets the domain restriction so that only accounts in your Workspace domain can complete sign-in, and checks that the restriction is enforced on the Strapi side as well as in the Google consent configuration. Document the exact domain value and who may change it. Done when a sign-in from an account in the allowed domain succeeds and the same flow with a personal Gmail account is rejected before an administrator session is created.

  5. Set auto-registration and the default role

    Decide whether new Workspace users should be created automatically on first sign-in, and choose the default admin role they receive. Choose the least-privileged role that still lets the person do their job, and review the role's permissions before enabling auto-registration. Confirm whether you will keep local login available as a fallback or lock it out once SSO works, and record that decision with the owner. Done when a test account in the allowed domain gets a new admin user with the chosen role and the role's permissions match what your access design requires.

  6. Test with a new account and a rejected account

    Using a Workspace account that has never signed in to Strapi, the tester opens the admin URL in a private browser window, completes Google sign-in and confirms the user record and role in the admin panel. Then the tester attempts sign-in with a personal Gmail account and an account from another domain, and confirms both are rejected and no admin user is created. Repeat the test after any change to the provider, the domain or the role. Done when both checks behave as expected and the results are recorded with the date, the Strapi version and the tester's name.

Which account attributes map to Strapi admin users

When an editor chooses to sign in with Google, the strategy returns a profile that Strapi turns into an administrator record. The fields that matter most are the primary email address, the display name and whether Google reports the address as verified. Google's OpenID Connect responses can also include a hosted domain claim, commonly written as hd, that identifies the Workspace domain. Whether the Strapi strategy reads that claim or relies only on the email address is a detail to confirm in the current Strapi SSO documentation and in a test login before you depend on it for access control.

  • Email address: Usually the value that matches an existing admin user and the value Strapi stores as the login identity.
  • Verified status: Confirm that unverified addresses cannot claim an account, and check how the strategy exposes this flag.
  • Name fields: The first and last name populate what editors see in the admin panel and what your audit trail shows.
  • Hosted domain claim: This is specific to Google. Confirm whether the strategy evaluates it before you treat it as a domain gate.
  • Changed profile data: Test how a name or email change made in Google is handled at the next sign-in.

Before go-live, sign in with a test account from outside your domain and with an unverified address, and record exactly what happens.

Google profile fields and Strapi admin fields

This table compares each Google identity field with the Strapi admin user field or access decision it feeds. Read it before configuring the provider, because the domain check, default role and local login lock-out decide who can reach the admin panel. Confirm each Strapi-side behavior against the plugin version you install, since field handling and lock-out options vary between releases.

Google field or settingStrapi admin useDecision or check to make
Primary email addressAdmin account identifier used to match or create the admin userConfirm whether matching is by email, and plan how changed or aliased addresses are handled
Hosted domain (hd claim)Gate that decides whether sign-in is allowed at allRestrict to your Workspace domain and test that accounts from other domains are refused
Email verification statusShould be checked before trusting the email as an identity keyConfirm the installed strategy exposes this claim and reject unverified addresses if it does
Display nameShown in the admin panel and audit history for the userSet expectations that it is informational and may not be used for access decisions
Auto-registrationCreates an admin user on first successful Google sign-inDecide whether new users may self-register or must be pre-created by an administrator
Default roleRole assigned to auto-registered admins, starting point for permissionsChoose the least-privileged role that works, then review it after the first sign-ins
Existing local adminsAccounts created with email and password before SSO is enabledKeep at least one tested recovery path before enabling any local login lock-out
Local login lock-outDisables password login to the admin panel once SSO is in placeEnable only after Google sign-in is verified, and confirm the recovery procedure first

Hardening Google sign-in for the Strapi admin panel

Google sign-in makes the admin panel reachable by every account the identity provider accepts, so the controls around it matter as much as the login flow itself. The cards below cover where the client secret lives, how the Workspace domain and Google consent settings narrow who can sign in, and how the default role, break-glass account and offboarding checks limit what a sign-in can do. Review them together with the wider Strapi security configuration before go-live.

Keep the client secret out of source control

The Google OAuth client secret grants the ability to start sign-in flows for your application, so it belongs in the environment or a secrets manager, never in committed configuration or a sample file. Confirm that the value is injected at runtime in each environment, that the staging and production clients are separate, and that the secret can be rotated without editing code. Check build logs and container images for accidental exposure, since a secret baked into an image persists after the config is fixed.

Strapi SSO docs

Enforce the Workspace domain in code

Google's consent screen set to internal limits sign-in to accounts in your Workspace organization, which is the first gate. Do not rely on that alone. Add a server-side check that the verified email domain matches your organization's domain and reject everything else before Strapi creates or activates an administrator. Test the check with an account from another domain and with an alias, since misconfigured aliases are a common source of unexpected access. Confirm whether your Google setup supports the internal option for your account type.

Keep one break-glass local admin

If the identity provider, the Google project or the Workspace tenant fails, administrators who depend on Google sign-in can lose access to the panel. Keep one local administrator account with a long unique password stored in a sealed secure location, and decide who may use it and under what approval. Strapi's optional local login lock-out can disable password login, so test the recovery path before enabling that setting. Review the account on a fixed schedule and log each use.

Set a least-privilege default role

Auto-registration creates a new administrator with the default role on first sign-in, so that role is effectively the access granted to anyone who passes the domain check. Choose the most restrictive role that still lets a new account log in, and grant elevated roles by a separate, recorded action. Confirm which content types and fields that role can read and write, and check that the role does not include settings or user management permissions that a new editor should not hold.

Review admin accounts after offboarding

Removing someone from the Workspace stops new Google sign-ins, but it does not remove the Strapi administrator record or existing sessions by itself. Build an offboarding step that disables or deletes the admin user in Strapi, confirms active sessions end, and reviews content they created or published. Run a periodic comparison between active Strapi administrators and current Workspace members, and treat any mismatch as a finding to resolve.

Require HTTPS-only callback URLs

The callback URL is where Google returns the authorization response, so each registered URL must use HTTPS and match the production host exactly. Remove development and wildcard callback entries from the production client, and confirm that the Strapi admin URL is served only over TLS with redirects from plain HTTP. A callback that points to an unexpected host is a sign-in redirect risk, so review the list of registered URLs whenever the domain or proxy configuration changes.

How to test Google admin sign-in before editors depend on it

Test Google admin sign-in in a staging copy of the Strapi project before any editor is asked to use it, and keep local admin login working until every case below passes. The point of the test is to prove that the Google strategy admits only the accounts you intend, creates admins with the default role you chose, and does not lock out the people who need to fix a failure. Run the matrix against the same Google OAuth client and allowed domain settings you plan to use in production, because a staging check against different settings proves little.

The matrix needs five cases. First, a valid account on your Workspace domain should sign in and be auto-registered as an admin with the intended default role. Second, a Workspace account outside the allowed domain should be refused, and so should a personal Google account, which tests whether the domain restriction is enforced on the server side and not only in the Google consent screen. Third, a suspended Workspace user should fail to sign in, which you must confirm in your own tenant because suspension behavior depends on how Google session and token lifetimes interact with Strapi. Fourth, an existing local admin with the same email should be linked or handled exactly as your SSO documentation describes, so check the result rather than assume it. Fifth, change the default role in staging, then sign in again and confirm the new role applies only where you expect.

Cut over in stages. Deploy the configuration to staging, complete the matrix, then enable Google sign-in in production for a small group of named admins while the local login remains available for a break-glass account. Record which test cases were run, by whom, and against which build, since reviewers from security or compliance will ask for that evidence. Only consider locking out local login, which Strapi's SSO settings allow, after the production group has signed in successfully for a period you agree with your security team and after you have tested the recovery procedure for a broken OAuth client.

Why Google sign-in to Strapi fails and how to fix it

This table lists the failures that most often block editors from signing in to the Strapi admin panel with Google Workspace, with the cause and fix for each. Read it when a sign-in attempt fails, or before go-live to rule out the usual problems. Most failures come from configuration mismatches, not from Strapi itself.

FailureCauseFix
Redirect URI mismatchThe callback URL registered in the Google OAuth client does not exactly match the URL Strapi sends, including path, port and trailing slash.Copy the callback URL from the Strapi SSO settings into the Google OAuth client, character for character, in each environment.
Callback path or protocol mismatch behind a reverse proxyStrapi sees http and an internal host, so it builds a callback URL that differs from the public https address.Set the public URL and proxy headers so Strapi builds https callbacks, and confirm the proxy forwards the original host.
Client secret not loadedThe client ID or secret is set in a file or secret store that the running container or process never receives.Confirm the environment variables are present in the running process, restart after changes, and never paste secrets into logs or code.
Consent screen restricted to other usersThe OAuth consent screen is set to internal or a test user list that excludes the editors who need access.Confirm the user type matches your Workspace setup and add test users or publish the app as your policy requires.
Domain check rejects valid usersThe allowed domain is compared with the primary domain only, so users signing in with a domain alias or secondary domain are refused.List every alias and secondary domain you accept, check how the Google account reports its domain, and test with one account per domain.
New accounts receive no useful roleAuto-registration assigns a default admin role with too few permissions, so new editors can log in but cannot work.Choose the default role deliberately, map editors to roles that match their work, and review new accounts after first login.
Lock-out after disabling local loginLocal admin login is turned off before SSO works, leaving no account that can change settings.Test SSO with a second admin account, keep a recovery path documented, and disable local login only after a successful test.

Questions teams ask before setting up Google SSO for Strapi

Is Google SSO for the Strapi admin panel included in every plan?

No. Strapi SSO applies to administrator sign-in to the admin panel, and on self-hosted plans it is an add-on for Growth and included in Enterprise. The Community Edition is free and includes unlimited users, but the SSO feature is not part of the free tier. The Growth plan is listed at 45 US dollars per month including 3 users, plus 15 dollars per extra user, according to Strapi's self-hosted pricing page. Confirm the current SSO add-on price with Strapi before budgeting, because the plan details sit with the vendor and can change.

What drives the cost of a Google SSO setup for Strapi?

The main cost drivers are the Strapi plan and license, the number of environments that need the same sign-in (for example, local, staging and production), the state of your Google Workspace groups and admin accounts, and how much testing the rollout requires. Identity cleanup can take longer than the Strapi configuration itself when admin accounts are shared, orphaned or mapped to the wrong roles. Ask any partner for a written scope that lists each environment, the number of role mappings, the test cases and who performs each step, then compare quotes against that scope rather than against a headline price.

How long does Google SSO for Strapi take to set up?

The duration depends mainly on the availability of your own people rather than on the technical work alone. The engineer needs access to the Strapi project and its environments, the Google Cloud project for the OAuth client, and an administrator who can approve the Workspace domain and default role. Delays usually come from waiting for approvals, from change windows for production, or from deciding which Workspace accounts should become administrators. Agree on a schedule that names the people who must respond at each step, and treat any date in a quote as dependent on those responses.

What access does the work need from our Google Workspace and Strapi admins?

The Google Workspace administrator or a delegated owner must be able to create or manage an OAuth client in the Google Cloud project that is linked to the organization, and must confirm which domain is allowed to sign in. The Strapi administrator must be able to change the SSO provider settings, set the default role for new admins, and decide whether local login stays available as a fallback. The people doing the work should not need permanent super-admin rights. Write down who holds each permission before the work starts, and remove temporary access once the configuration is verified.

Can an internal team set up Google SSO for Strapi without a partner?

Yes, if the team has someone comfortable with OAuth 2.0 redirect URLs, Node.js project configuration and Google Workspace administration. The Strapi configuration is small, but the risk sits in the details: the callback URL must match exactly, the allowed domain must be enforced, the default role must be least-privilege, and a local fallback must be tested before local login is disabled. Teams without that mix often find that outside review is cheaper than a lockout incident. Whichever route you choose, verify the sign-in path with a non-administrator account and keep a documented way back in.

Does Google SSO replace end-user login for our Strapi front end?

No. Strapi SSO covers only administrator login to the admin panel. End users of a website or app are authenticated separately through the Users & Permissions plugin, which uses its own providers and sessions. If your public application needs Google sign-in for customers, that is a different configuration covered in a separate topic. Keeping the two apart matters for access reviews, because an editor who can sign in with Google to the admin panel has no automatic right to any end-user account.

What should we test before turning off local admin login?

Test with at least one account from each intended role, including an account that should be denied. Confirm that a Google account outside the allowed Workspace domain cannot create an admin, that new users receive the default role you chose, and that role changes in Strapi take effect at the next sign-in. Keep a break-glass local administrator until these checks pass in every environment, and record who can use it and how its credentials are stored. Repeat the checks after any change to the Google OAuth client or the Strapi version.

Which Strapi version should we use with Google SSO?

Use a currently supported Strapi 5 release, because Strapi v4 reached end of life on April 30, 2026, and its final release will receive no further updates, according to the Strapi migration documentation. Strapi 5 minor releases ship frequently, so pin the version in your project and test SSO after each upgrade rather than assuming it keeps working. Confirm the Node.js version and database requirements in Strapi's installation documentation before you start, since Strapi 5 runs only on Active or Maintenance LTS Node.js versions.

How an editor signs in to Strapi through Google

The flow starts when an editor opens the Strapi admin panel and chooses Google sign-in, which redirects the browser to Google's OAuth endpoint. After the editor approves, Google returns an authorization code to the Strapi callback, and Strapi exchanges it for the account profile. The trust boundary sits at the domain check and auto-registration step: Strapi should accept only accounts from your Workspace domain and assign the default role before the editor reaches the panel. Confirm the domain restriction and default role in your own test environment before go-live.

Editor sign-in flow from the admin panel through Google and back to Strapi.

How DeployOpen scopes and delivers Strapi SSO work

DeployOpen plans, configures and hands over Strapi admin sign-in through Google Workspace as part of a fixed-scope engagement inside your own infrastructure. The work covers the OAuth client, domain restriction, default role assignment and a tested fallback, so your security and IT teams can review each setting before editors rely on it.

How we scope

  • Confirm your Google Workspace primary domain and any approved secondary domains before any configuration starts
  • Record the Strapi edition and plan, since SSO is an add-on on Growth and included in Enterprise
  • Agree in writing which default role new admins receive and who approves role changes afterward

How we build

  • Configure the Google OAuth client and callback URL for each Strapi environment, including staging and production
  • Restrict sign-in to your Workspace domain and test that accounts outside it are rejected
  • Test auto-registration, default role assignment and the local login lock-out in a non-production instance first

How we hand over

  • Deliver a written runbook covering client settings, environment variables, callback URLs and rollback steps
  • Document the role mapping and the named owner for granting or removing editor and administrator access
  • Walk your IT and security staff through the configuration and the test evidence before the change goes live

How we support

  • Available as a retainer for updates to the Strapi version, the passport strategy and the Google OAuth settings
  • Retesting after Strapi upgrades or changes to your Workspace domain, groups or admin policies
  • Scope any follow-on work, such as role design or other identity providers, in a separate written agreement

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.