"Error 403: disallowed_useragent." when Using Google Sign In

Last Updated: Aug 21, 2024

Overview

When trying to log in via Google Account on a mobile device, the user receives an error stating:

Error 403: disallowed_useragent.

Applies To

  • Google Social Connection
  • Webview
  • Embedded browser

Cause

Google blocks login attempts from Webviews Embedded browsers.

Auth0’s latest SDKs should use the device browser. However, if custom changes were applied to use an embedded browser or the user is directed to a website from within a third-party application that uses web views, this issue will arise.

Solution

Use the device’s browser. Embedded browsers cannot be used in conjunction with Google as this is blocked on Google’s side.

To complete the authentication flow using the device’s browser, ask the operating system to open a system browser, navigate to the provided URL, and relay the results back to the application after the flow is finished. To achieve this behavior, monitor the browser until it reaches the callback URL.

The method for requesting the device to open a system browser varies depending on the chosen SDK. For more information, refer to the corresponding SDK’s documentation.

Related References