Enterprise
Use Google Workspace to let a colleague sign in with their work account. Open Mercato can create their local account on first sign-in. Google Workspace uses that just-in-time path for this integration, so plan separately for removing access.
This guide walks through setting up Google Workspace as the identity provider for OIDC login in Open Mercato. Google Workspace supports JIT (Just-In-Time) provisioning only – SCIM push provisioning is not available.
Tip · Free tier
Google Cloud OAuth 2.0 is free for internal Workspace applications. No paid APIs required.
company.com)Open Mercato SSO (or your preference)| Field | Value |
|---|---|
| App name | Open Mercato |
| User support email | Your admin email |
| Authorized domains | Your Workspace domain (e.g., company.com) |
| Developer contact email | Your admin email |
openidemailprofile| Field | Value |
|---|---|
| Application type | Web application |
| Name | Open Mercato SSO |
| Authorized redirect URIs | http://localhost:3000/api/sso/callback/oidc |
| Credential | Value |
|---|---|
| Issuer URL | https://accounts.google.com |
| Client ID | Copy from Credentials page |
| Client Secret | Copy from Credentials page |
| Redirect URI | http://localhost:3000/api/sso/callback/oidc |
Note
Google's OIDC discovery document is at https://accounts.google.com/.well-known/openid-configuration.
Google Workspacehttps://accounts.google.comcompany.com)[email protected])Google Workspace does not support SCIM push provisioning to third-party applications. Users are provisioned via JIT on their first SSO login. The Provisioning tab in the Open Mercato admin UI will show an informational message for Google Workspace configurations.
To manage user access:
Google's standard OIDC tokens do not include group membership claims. If you need role-based access from Google groups, you would need to configure a custom claim via Google's Directory API (advanced setup, not covered here).
For most setups: leave Role Mappings empty in the SSO config. Users will log in with their default assigned role.
hd ClaimGoogle OIDC returns a hd (hosted domain) claim for Workspace accounts. This identifies the user's organization domain. Open Mercato validates the user's email domain against the allowed domains configured in the SSO config.
email_verifiedGoogle Workspace accounts always return email_verified: true. Personal Gmail accounts may have unverified emails – configuring the consent screen as Internal prevents personal accounts from accessing the application.
This appears when the consent screen is set to External without Google verification. Solution: set the consent screen to Internal (Workspace users only).
http://localhost:3000/api/sso/callback/oidchttps://accounts.google.com (not a tenant-specific URL)openid, email, and profile scopes are configured on the consent screenThe redirect URI in the authorization request doesn't match what's registered in Google Cloud Console. Check:
APP_URL in .env matches what you registered (e.g., http://localhost:3000)This happens when Role Mappings are configured but Google doesn't send group claims. Solution: clear the Role Mappings section in the SSO config (leave it empty) to allow login without IdP-based role assignment.
If you set the consent screen to External, any Google account can authenticate. To restrict to your organization only, set the consent screen to Internal.
| Aspect | Google Workspace | Entra ID |
|---|---|---|
| Issuer URL | https://accounts.google.com (same for all orgs) | https://login.microsoftonline.com/{tenant-id}/v2.0 |
| SCIM provisioning | Not supported | Enterprise App -> Provisioning |
| Group claims | Not in standard OIDC tokens | Via optional claims configuration |
| User provisioning | JIT only (on first login) | JIT or SCIM (automatic sync) |
| Org restriction | OAuth consent screen: Internal | App registration: Single tenant |
| Free tier | Free with any Workspace plan | Free with any Azure account |
| Redirect URIs | Supports http://localhost for dev | Supports http://localhost for dev |
Previous: Microsoft Entra ID Setup · Next: Single Sign-On (SSO)