Auth0 Google Social Login Fails With "redirect_uri_mismatch" for Workspace Domain
Last Updated:
Overview
When a user tries to sign in with a Google Social connection, the process fails with a redirect_uri_mismatch error. This issue occurs when the user's email domain is also configured as the Google Workspace Domain on the Google Workspace connection in Auth0. The system routes the authentication request to the Google Workspace connection instead of the intended Google Social connection, causing a mismatch in the redirect URI.
redirect_uri_mismatch
Applies To
- Auth0
- Identity Provider (IdP)
- Google Social Connection
- Google Workspace Connection
Cause
This issue is caused by a documented limitation in how Auth0 routes connections based on email domains. According to Auth0's documentation, if an application has both a Google Social connection and a Google Workspace enterprise connection configured for the same domain, users will automatically be logged in through the enterprise connection.
This routing to the enterprise connection occurs even if the user initiates a social login and even if the Google Workspace connection is not explicitly enabled for that application. Consequently, the redirect_uri_mismatch error happens because the authentication request is processed using the settings of the Google Workspace connection, which may not be configured with the correct redirect URI in its Google Cloud project.
Solution
To resolve this, add the correct Auth0 callback URL to the Google Workspace application's credentials within the Google Cloud Platform (GCP) console.