Google OIDC sign-in
Connect Google accounts to CrossWatch through OpenID Connect.
CrossWatch supports Google accounts through OpenID Connect (OIDC).
Link a Google account to a CrossWatch administrator or managed user. Then use that account to sign in.
Google is configured as a standard OIDC provider in CrossWatch.
Requirements
Before you start, you need:
A working CrossWatch installation.
A public HTTPS address for CrossWatch.
Access to the Google Cloud Console.
A Google account to link to CrossWatch.
For example:
https://crosswatch.example.comWhen using a custom port:
https://crosswatch.example.com:8787Google requires HTTPS redirect URIs for web applications. Limited localhost exceptions apply.
Create or select a Google Cloud project
Open Google Cloud Console → Google Auth Platform.
Create a project or select an existing project for CrossWatch.
If needed, select Get started. Then configure the application information.
Google Auth Platform manages OAuth clients, branding, audiences, and scopes.
Configure the audience
Open Google Auth Platform → Audience.
Choose the audience that matches your environment:
External usually suits personal installations.
Internal limits access to a Google Workspace organization.
Google only permits Internal for projects in a Google Cloud organization.
If the app is in Testing, add each permitted Google account as a test user.
Google limits Testing applications to configured test users. Test authorizations expire after seven days.
Create the OAuth client
Open Google Auth Platform → Clients. Create an OAuth client.
Set Application type to Web application.
Name the client, for example, CrossWatch.
Google generates a Client ID and Client secret. You need both values in CrossWatch.
Configure the redirect URI
Under Authorized redirect URIs, add the CrossWatch callback URL:
For example:
The URI must exactly match CrossWatch's request. Match the protocol, hostname, port, and path.
Google returns redirect_uri_mismatch when any value differs.
CrossWatch always uses this callback path:
Leave Authorized JavaScript origins empty. CrossWatch uses a server-side authorization code flow.
Save the OAuth client.
Configure OIDC in CrossWatch
Open Settings → UI Settings → Security → OIDC sign-in.
Configure these values:
Google's OIDC issuer is:
CrossWatch requires the openid scope. Do not enter an email address as a scope.
Click Save OIDC.
CrossWatch now displays Configured, not linked. The provider works, but no account has a linked Google identity.
Link your Google account
Click Link OIDC account.
Select the Google account to associate.
Complete Google's sign-in flow.
CrossWatch stores Google's issuer and subject identifier against your account.
The status then shows identity details, such as:
The displayed details depend on Google's returned identity data.
CrossWatch shows OIDC sign-in only after at least one account has a valid linked identity.
Test Google sign-in
Log out of CrossWatch.
Select Sign in with OIDC on the login screen.
Authenticate with the linked Google account.
CrossWatch matches the Google issuer and subject identifier. It does not identify accounts by email alone.
Reverse proxy installations
CrossWatch must determine its external HTTPS address behind a reverse proxy.
For example, a browser may use:
The proxy may connect internally using:
Google must receive the external HTTPS callback URI.
Your reverse proxy should send:
CrossWatch trusts these headers only from configured Trusted proxies.
Open Settings → UI Settings → Security → Trusted proxies. Add the proxy IP address or network.
For example:
Docker proxies may appear through a bridge address. Configure the actual proxy address or trusted Docker network.
Do not trust all addresses unless your environment explicitly requires it.
Synology Reverse Proxy
Open the CrossWatch reverse proxy rule in Synology DSM. Add these custom headers:
Replace the hostname and port with CrossWatch's public address.
Also add the Synology proxy address under Trusted proxies in CrossWatch.
Troubleshooting
Error 400: redirect_uri_mismatch
Check the redirect_uri in Google's error details.
For example, Google may receive:
while the OAuth client permits:
CrossWatch is not detecting HTTPS correctly. Check:
X-Forwarded-ProtoX-Forwarded-HostTrusted proxies
Google rejects differences in scheme, hostname, port, or callback path.
Google sign-in works, but status says “Configured, not linked”
Use a CrossWatch version that includes the OIDC administrator status fix.
Older development builds could store an administrator identity but report it as unlinked.
Administrator identities are stored under:
Managed-user identities are stored under:
CrossWatch preserves both configuration forms.
Access blocked by Google
For an External application in Testing, add the Google account to the test user list.
Google allows only configured test users during Testing.
OIDC sign-in is missing
OIDC must be:
Enabled.
Configured.
Linked to at least one CrossWatch account.
CrossWatch intentionally hides OIDC sign-in until a linked identity exists.
Example configuration
Google OAuth client:
CrossWatch:
Save the configuration, link an account, and complete Google sign-in.
OIDC sign-in is then available for the linked account.
Last updated
Was this helpful?