How Open edX sign-in with Google Workspace works
Open edX third-party authentication supports Google as one of its default OAuth2 providers, so learners and staff can sign in with existing Google accounts instead of a separate Open edX password. Registration can also be restricted with allowed email patterns, which lets you accept only addresses from your own Google Workspace domain. Together these two controls cover the common request: use the company's Google identities and keep outsiders from creating accounts. The method is OAuth2 through the platform's third-party auth framework, so the integration depends on a Google OAuth2 client that you create and register with the LMS, along with the redirect URI that Open edX expects for that provider. Confirm the current setup steps for the Google provider against the supported identity providers documentation before you start, because the exact configuration keys and admin screens depend on the release you run.
At login, the learner clicks the Google option on the LMS sign-in page and is redirected to Google. Google authenticates the user and returns an identity to Open edX, which then either matches an existing account or creates a new one. Whether a new account is created automatically, or whether the learner must complete a registration form first, is a configuration choice you should settle with the security and compliance team. The allowed email pattern check runs at registration, so you should test with a personal Gmail address, an address from a second domain and a Workspace address to confirm each path behaves as intended. Plan the test matrix before go-live, because a pattern that is too loose admits unwanted domains and one that is too strict blocks legitimate staff.
Linking existing accounts is a separate decision from enabling Google sign-in. A learner who already has an Open edX username and password can connect a Google identity to that account, but the link only makes sense if the email addresses match your records and you trust that the account belongs to the same person. Decide who may link accounts, whether learners can do it themselves, and how staff accounts with elevated roles are handled, since those accounts should not be linked casually. Record these choices in your access policy, and confirm with the documentation how linking and auto-registration behave in the release you deploy.
What you need before configuring Google sign-in
Google sign-in for Open edX depends on four things lining up: a running platform, a Google Cloud OAuth client that points back at your LMS, a Workspace domain that defines who may register, and an administrator who can change LMS settings. Confirm each one before configuration starts, because a mismatch in any of them usually shows up as a failed login rather than a clear error.
A running Open edX deployment
Google sign-in is configured on a live LMS, so you need a working deployment first. The edx-platform maintainers recommend running Open edX in production through a service provider or with Tutor, since bare-metal installation is complex and gets limited community support. Confirm which Open edX release you run against the release notes before work starts, because the latest named release is the only supported one and settings can change between releases.
Release notesA Google Cloud OAuth client
The OAuth2 client lives in a Google Cloud project and must register the exact redirect URI of your LMS, including the scheme and host that learners will use. Record the client ID and secret in your secrets store, not in shared documents. Confirm the project setup, consent screen and client type with Google's current documentation, because those screens change and the redirect URI must match character for character.
A Google Workspace domain
Restricting sign-in to your organization depends on a Google Workspace domain that you control and that holds the accounts you intend to admit. Decide which domains are allowed, whether personal Gmail accounts are excluded, and who manages users in the Workspace admin console. The allowed registration email patterns you configure in Open edX only work if the addresses they match are real, managed mailboxes.
Admin access to LMS settings
Enabling a third-party provider and entering its credentials requires an account with access to the LMS administration settings, typically a superuser or an account with equivalent rights. Confirm who holds this access, how it is granted, and whether changes are logged. Limit the number of people who can alter provider settings, since a change to allowed email patterns can open or close the sign-in path for a whole group of users.
A test learner and staff account
Plan at least one Workspace account in the allowed domain and one outside it before you change production. The in-domain account confirms the provider flow and attribute mapping work, and the outside account confirms the restriction blocks registration. Also decide how existing learners with local passwords will link their accounts, so you can test that path before real users reach it.
Configuring the Google provider and domain limit
This sequence turns on Google sign-in for Open edX, restricts registration to your Workspace domain, and confirms that both members and non-members are handled as intended before any learner or staff account is linked.
Create the Google OAuth client
Your identity or platform administrator creates an OAuth2 client in the Google Cloud project that your organization controls, registers the callback URL for your Open edX LMS, and records the client ID and client secret in your secrets store. Confirm the exact redirect URI format against the current Open edX supported identity providers documentation before you save the client. The step is done when the client ID and secret are stored where only the platform operators can read them, and the redirect URI in Google matches your LMS domain exactly.
Enable the Google provider in third-party authentication
A site operator enters the client ID and secret in the third-party authentication settings for the Google OAuth2 provider and turns the provider on for the LMS. Keep the secret out of version-controlled configuration and confirm the setting names with your Tutor or platform configuration method before deploying. The step is done when the Google sign-in button appears on the sign-in page of a test environment and a sign-in attempt reaches Google's consent screen.
Set allowed registration email patterns
The operator sets the allowed registration email patterns so that only addresses matching your Workspace domain can create accounts through the Google provider, for example a pattern that matches your company or school domain. Write the pattern carefully and review how it matches addresses with unusual suffixes before you publish it. The step is done when the setting is saved in the test environment and the configuration has been reviewed by a second person who understands the domain rules.
Test a Workspace account sign-in
A tester signs in with a Google account from your Workspace domain on a fresh browser session and confirms that the account is created or matched, that the learner or staff profile shows the expected name and email, and that the correct role or dashboard loads. Record the account and the result. The step is done when the Workspace sign-in completes and the new account appears in the LMS admin list with the expected email address.
Test a non-member account sign-in
A tester signs in with a personal or external Google account that does not match the allowed patterns and confirms that registration is refused with a clear message and no account is created. Also check that an existing non-member account cannot be used to bypass the restriction through the provider. The step is done when the refusal is observed, the admin list contains no new account for that address, and the test result is recorded alongside the Workspace test.
Decide and test account linking for existing users
Decide how learners and staff who already hold local Open edX accounts will connect their Google identity, either by linking the accounts on first sign-in with a verified email match or by asking them to use a separate path. Test each option with an existing account, including a case where the email addresses differ in capitalization or the account has no verified email. The step is done when the chosen linking behavior is documented, the test results are recorded, and the support team has the instructions for users whose linking fails.
Linking existing accounts without creating duplicates
The most important decision in this section is whether a Google sign-in can attach itself to an existing local Open edX account, and on what basis. Open edX third-party authentication links an identity to a user account, and the safe default is to match only on an email address that the platform can trust. A learner or staff member who already has a local account with the same address should land in that account, not in a second one created from the Google profile. Duplicates split enrollments, certificates, grades and staff roles across two identities, and they are hard to merge later. Before go-live, confirm in your Open edX version how the third-party auth pipeline handles an existing account with a matching email, and test it with a dummy user, because the behavior is the part most likely to differ between releases and between Tutor configurations.
The main risk is account takeover. If a local account was created with an email address that nobody verified, anyone can register a local account claiming a colleague's address, wait for that colleague to sign in with Google, and have the Google sign-in attach to the attacker's account or the reverse. Google Workspace only asserts that the person controls the address inside your domain, so the protection depends on how the local side was created. Ask whether local accounts require email verification before they can be used, and whether any accounts were created by administrators or bulk import without verification. Accounts that predate the Google integration are the highest risk and should be reviewed first.
For most sites, the choice is between automatic matching on verified email and a manual linking step where the user signs in locally first, then connects Google from the account settings. Automatic matching removes support tickets and suits a site where all local accounts are verified and the Workspace domain is the only source of identity. Manual linking is slower, but it requires the user to prove control of the local account with its password or existing login, which blocks takeover through an unverified address. Many operators use manual linking for accounts created before the integration and automatic matching for accounts created afterward. Write the choice down, and confirm the exact pipeline steps and any admin override with your Open edX release before you enable it for real users.
Account and attribute mapping for Google sign-in
This table maps the Google account attributes that matter for sign-in to the Open edX user record and to the registration email pattern rule. Read each row as a decision to make before enabling the provider, then confirm the exact setting and field names in the Open edX third-party authentication documentation for your release. The main takeaway is that the domain restriction and the account linking choice determine who can get in and which existing learners are affected.
| Attribute or decision | What to map or decide | What to confirm before enabling |
|---|---|---|
| Google account email | Use as the primary identifier for matching and for the allowed registration pattern check, so the Workspace domain is enforced at sign-in. | Which Google claim the default OAuth2 provider passes as email, and whether the Open edX account record stores it as the login email. |
| Email verification status | Accept sign-in only for verified Google addresses so an unverified address cannot claim a Workspace domain. | Whether the provider exposes a verified-email flag to Open edX and how the platform treats an unverified value. |
| Workspace domain claim | Use the hosted domain value from the Google account as a second check alongside the email pattern, so personal accounts with a matching string cannot pass. | Whether the default Google provider returns a hosted domain claim, and where it is checked in the configuration. |
| Full name | Map to the Open edX display name, and decide whether staff names are taken from Google or edited by the learner afterward. | Which name fields the provider returns and whether the full name field is overwritten on each sign-in. |
| Username generation | Choose between a generated username from the email local part and a learner-chosen username, and plan how collisions between two addresses are resolved. | How the platform builds the default username when the provider supplies no username, and whether learners can change it later. |
| Allowed registration email patterns | List the Workspace domains and any sub-patterns, such as staff or student domains, that may create new accounts through Google. | The pattern syntax the release accepts and whether the pattern applies to existing-account sign-in as well as new registrations. |
| Existing accounts before sign-in is enabled | Decide whether a learner with a local password and the same email is linked to Google on first sign-in or must link manually, and communicate the choice. | The account linking behavior in the third-party authentication docs for your release, and whether the local password continues to work after linking. |
| Accounts outside the Workspace domain | Decide whether existing learners outside the domain keep password sign-in, lose access, or move to a separate provider. | Whether a user who does not match the pattern is blocked from Google sign-in only, or from all sign-in, in your configuration. |
Securing Google sign-in for a Workspace domain
Google sign-in widens who can reach your Open edX site, so the controls need to work together. The registration pattern decides who can create new accounts, the client secret decides who can impersonate your platform, and the Workspace and logging controls decide how quickly access can be removed and proven afterward. Check each one before learners and staff depend on it.
Anchor the registration email pattern
Allowed registration email patterns decide which new Google accounts can create an Open edX account. Anchor the pattern to the exact domain, with the at sign and the domain ending, so that a lookalike domain such as a suffix attached to your domain cannot match. Write the pattern in the form your operator documentation describes, then test it with an account from inside the domain, an account from outside it, and a lookalike domain. Note that this limit restricts new registration only, so it does not remove access for accounts that already exist.
Allowed email patterns docsTest the pattern against existing accounts
Because the pattern gates only new registrations, accounts created before the change, or accounts created through other routes, stay active. Build a list of existing learner and staff accounts with email addresses outside the domain, such as guest instructors, former employees and contractors, and decide for each one whether it should remain. Confirm with your operations team how those accounts will be disabled or reviewed, and record the decision before go-live.
Protect the OAuth client secret
The Google OAuth2 client secret lets your platform exchange authorization codes with Google, so treat it like a production credential. Store it in your secrets manager or the secret mechanism of your deployment tooling rather than in a plain configuration file, a repository or a shared chat. Restrict read access to the people and services that deploy the platform, and plan a rotation procedure that updates Google and the platform in the same change window.
Limit who edits third-party authentication
Changes to third-party authentication settings alter who can sign in and which provider a user is matched to. Limit edit rights for these settings to a small named group of platform administrators, and keep course staff and site support accounts out of that group. Route changes through your normal change process, with a second reviewer and a record of the previous configuration so you can restore it quickly.
Review Workspace-side access and suspension
Open edX trusts the sign-in that Google completes, so an account suspended or removed in Google Workspace can still hold a valid session until it expires. Confirm with your identity team how Workspace suspensions, departures and group changes reach the platform, and whether learner accounts should be disabled on the Open edX side as part of offboarding. Test a suspended test account against a live session before you rely on the process.
Log and review sign-in events
Record sign-in, failed sign-in, registration and account linking events from the platform and send them to your central log store. Review them for registrations from unexpected domains, repeated failures on staff accounts and linking events that do not match a user request. Confirm with your security team which retention period applies to these logs, and check that the logs omit secrets and tokens.
Google sign-in crosses the trust boundary once, and the LMS decides who gets an account
The flow starts when a learner selects Sign in with Google on the LMS login page. The browser is redirected to Google's OAuth2 provider, which returns an authorization code to the LMS callback. Only after that return does the LMS run the registration email pattern check and then match the email to an existing account or create one. Check that the pattern check runs before any account is created, and that the boundary box holds every component the LMS controls.
Google sign-in leaves the LMS once and returns to it before any account change.
Common failures and questions during Google sign-in setup
Why does Google sign-in fail with a redirect URI mismatch error?
The callback URL registered in your Google Cloud OAuth client does not match the URL Open edX sends during sign-in, so Google refuses the request. The usual cause is a mismatch in scheme (http versus https), host name, port or trailing path, often because the LMS and Studio domains differ or a staging hostname was copied into a production client. The fix is to copy the exact callback URL from your LMS configuration into the authorized redirect URIs for the OAuth client, then test each domain separately. Confirm the exact value with your Open edX version's third-party authentication documentation before editing the client.
Why are some Google users blocked by the allowed email pattern?
Open edX checks the registration email against the allowed patterns you configured, so any account whose address does not match is refused even though Google authenticated it. Common causes are a pattern that is too narrow, a missing escape for a dot in the domain, or a learner using a personal Gmail address that was never meant to be included. Review the pattern against a few real test accounts from each group you expect, and adjust it deliberately rather than loosening it for everyone. The specification is described in the allowed registration email patterns guide.
What happens when a Workspace user signs in with a domain alias?
A Workspace user whose primary address uses one domain but whose sign-in address uses a secondary domain alias can fail the pattern check, because the pattern only matches the domain you listed. The fix is to decide which domains are authoritative, add the alias domains to the allowed patterns if they belong to your organization, and confirm which address Google returns in the profile data for those users. Test with an account that uses an alias before rollout, since the failure only appears for that group.
Why do duplicate accounts appear after linking a Google login?
Duplicates usually happen when a learner first registered with a password, then signed in with Google using a different email address, so Open edX created a second account instead of linking to the first. Another cause is a case difference in the email address or a changed primary address in Workspace. Decide the matching rule before go-live: link on a verified, identical email, and have a documented process for merging accounts that were created by mistake. Check the account linking behavior for your Open edX release, and confirm with your support team how merges are performed and logged.
Why does Google sign-in work in staging but not in production?
Staging and production almost always differ in configuration rather than code: a different OAuth client, a different callback URL, a different allowed email pattern, or a secret that was never copied to the production environment. Compare the environment values side by side, starting with the client identifier, the redirect URI, the pattern setting and the site domains, and make sure the OAuth consent screen is set for the right audience. Keep these values in version-controlled configuration so the environments cannot drift apart silently.
Can our own team set up Google sign-in without a partner?
Yes, if someone on your team can administer the Google Cloud project and the Workspace admin console, and can edit and redeploy the Open edX configuration. The work is mostly configuration and testing, but it still needs a planned test plan covering each domain, each allowed pattern and the linking behavior for existing accounts. A partner is useful when the identity design involves several identity providers, strict audit requirements or a tight deadline. Ask any provider for a written scope that lists the test cases and the handover of configuration before you agree on a fixed price.
What drives the cost of setting up Google sign-in?
The main cost drivers are the number of environments, the number of allowed domains and patterns, the amount of linking and cleanup needed for existing accounts, and the testing and documentation your compliance team expects. Setup is largely one-time work, while ongoing costs come from changes when domains are added or Google settings change. Ask for a quote that separates the initial configuration, account migration and testing from any support retainer.
Differences between test and production configuration
Several values in a Google sign-in setup are tied to a specific hostname, so they cannot be copied unchanged from a test instance into production. The OAuth client registered with Google records the authorized redirect URI for each site, and the LMS domain in the platform configuration must match it exactly. A staging instance and the production instance therefore usually need separate OAuth clients, or at minimum separately registered redirect URIs, so that a test login never depends on production credentials.
- Redirect URIs: Each hostname where the LMS answers, including any preview or staging address, needs its own registered callback URI in the Google console.
- OAuth client ID and secret: Keep one client per environment so that rotating or revoking a staging secret does not affect learners.
- Platform domain settings: The LMS and Studio hostnames in the Tutor configuration must match the values registered with Google for that environment.
- Allowed registration patterns: The permitted email domains may differ, for example a test Workspace domain or a sample account set for staging.
- Secrets storage: Confirm where each environment's client secret is kept and who can read it.
Before going live, check that the redirect URIs in both consoles match the hostnames your Tutor instance actually serves, and that no production secret was placed in a non-production configuration file.
Some decisions are intended to be identical in both environments because they define the sign-in model rather than the location. Using the Google OAuth2 provider, choosing the Workspace domain, and deciding how existing accounts are linked should be settled once in the design and then reproduced. If staging behaves differently from production in these areas, the test results do not prove much about the production setup.
- Provider choice: Google is one of the OAuth2 providers Open edX supports by default, so the same provider path should be configured in both places.
- Restriction logic: The rule that limits registration to matching email addresses should use the same pattern structure in both environments, with only the domain values differing.
- Account linking behavior: Decide whether existing learners link by matching verified email before testing, and apply that rule consistently.
- Role and staff access: Confirm that staff accounts map to the same roles in staging and production.
- Logging and error handling: Failed sign-ins should be visible in both places so that the same troubleshooting steps apply.
Write these shared decisions down as the configuration baseline and confirm each environment matches it before testing the environment-specific values.
Enabling Google sign-in for all learners is hard to reverse cleanly once accounts exist, so the setting should first be exercised with a controlled set of accounts. The test should cover the paths a real learner will take, including a permitted Workspace account, a disallowed account, and an existing learner whose account must be linked rather than duplicated. Results should be recorded so that the production change can be traced back to a passed test.
- Permitted account sign-in: A test user in the allowed domain should register or sign in and reach the expected dashboard.
- Disallowed account rejection: An account outside the pattern should be refused with a clear message, and no account should be created.
- Existing account linking: A pre-existing test learner should link to the Google identity without creating a second account.
- Staff sign-in: Staff accounts should reach Studio or the instructor pages with the roles they need.
- Rollback check: Confirm you can disable the provider and return to the previous login path without data loss.
Ask your implementation partner or internal team to document the test results and the rollback steps, and confirm which of these checks they will run in your environment before the setting is enabled for everyone.
Questions buyers ask about Google sign-in for Open edX
How much does Google sign-in for Open edX cost?
The cost depends on the size of the configuration, not on a fixed package. A quote follows from the written scope, and DeployOpen does not publish a price list. The main cost components are the time to set up the Google OAuth2 provider, limit registration to your Workspace domain, decide how existing accounts are linked, and test the sign-in paths. The one-time work is the setup and testing. Recurring costs appear only if you buy ongoing support or retainers. Ask any provider to itemize these components in the quote.
How long does it take to set up Google sign-in?
Duration depends on how many email domains and aliases must be accepted, how many existing accounts need linking, and how thoroughly the sign-in and registration rules are tested. A single domain with few existing accounts is a smaller job than a multi-domain school or company with long-standing learner records. No duration figure is given here. Ask for a timeline in the written scope, with the dependencies on Google Workspace and Open edX admin access listed separately.
What do we need to provide before the work starts?
Three things need to be in place. First, Google Workspace admin access, so the OAuth2 client can be created in the correct Google Cloud project and the domain setting can be confirmed. Second, Open edX admin access to the LMS third-party authentication settings and the allowed registration email pattern configuration. Third, a decision on existing accounts: whether learners and staff who already registered with a password should be linked to their Google identity, and how the platform should handle a Google address that matches no existing account.
Can our own team set up Google sign-in without a partner?
Yes, a capable team with Open edX operations experience can configure the built-in Google OAuth2 provider and the registration email pattern settings. The work is mostly configuration, but it touches authentication and account identity, so mistakes can lock out users or open registration wider than intended. Assess whether your team has someone who can test each sign-in path, including linked accounts, and can roll back a change. Document the decisions so the setup survives staff changes.
What drives the effort up for account linking?
Account linking is the largest variable after domain scope. If every existing learner and staff member has a unique email address that matches their Google Workspace account, linking is straightforward. Effort rises when addresses differ between systems, when people use aliases or old domains, when accounts share an address, or when staff need different roles than learners. Each of these cases needs a rule, a test and sometimes a data check before go-live. Decide the rules before the build starts.
What are the main risks of restricting sign-in to a Workspace domain?
The main risks are locking out legitimate users and accepting accounts you did not intend to admit. A misconfigured pattern can reject valid addresses, while a loose pattern can allow personal accounts or domains that belong to another organization. Test with accounts from each permitted domain and from a disallowed one. Also confirm how the platform behaves for a Google user who is not yet registered, since auto-registration choices affect who can create an account.
Which tests should be included before go-live?
Test the sign-in paths that real users will take, not only the happy path. Include a new learner from an allowed domain, an existing learner who links an account, a staff member with an elevated role, a user from a disallowed domain, and a user with a Google account that matches no record. Check the audit trail for each. Ask your provider to show which tests are in the written scope and who signs off on the results.
How DeployOpen scopes and delivers Google sign-in
DeployOpen plans, implements, tests and documents Open edX sign-in with Google Workspace inside your own infrastructure, so your identity and security teams can review every setting. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- We confirm your Google Workspace domain, admin roles and which learner and staff groups need access.
- We document the allowed registration email patterns and how existing accounts will be linked.
- The written scope lists the Open edX release and hosting setup the sign-in work will target.
How we build
- We register the Google OAuth2 client and configure the default Google provider in your Open edX environment.
- We set the allowed registration email patterns so only your Workspace domain can create accounts.
- We test first sign-in, account linking for existing users and rejection of addresses outside the domain.
How we hand over
- You receive a written configuration record covering provider settings, domain rules and linking steps.
- Runbooks explain how to add a new domain pattern, rotate the client secret and handle a locked account.
- Test evidence from sign-in and rejection cases is delivered so your security team can review it.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Changes to Google Workspace domains or Open edX releases can be retested under the retainer.
- Ask any provider to confirm the current Open edX release and Google OAuth2 requirements before quoting.

