disallowed_useragent Authentication Origin: Application & API OSI layer 7 · Application Last updated 12 Oct 2026

Google OAuth: Error 403: disallowed_useragent (sign-in from an embedded WebView)

Google blocks OAuth sign-in inside embedded WebViews (in-app browsers, Electron BrowserWindow, React Native WebView).

Exact message you may see Error 403: disallowed_useragentThis user-agent is not permitted to make an OAuth authorisation request to Google
Seen on: REST API

Meaning

Google requires the system browser or Custom Tabs/ASWebAuthenticationSession for OAuth. In-app browsers of social apps (Instagram, Facebook) also trigger it when users open your site there.

Common causes

  • OAuth inside WKWebView/Android WebView/Electron
  • Link opened in Instagram/Facebook/LinkedIn in-app browser
  • Custom user agent spoofing

⚡ Quick fix

  1. Use AppAuth / ASWebAuthenticationSession / Custom Tabs
  2. In web apps, detect in-app browsers and ask users to open in the system browser
  3. Use Google’s native sign-in SDKs

Detailed fix by platform

Swift

  1. bash
    let session = ASWebAuthenticationSession(url: authURL, callbackURLScheme: "com.example.app") { url, error in /* handle */ }
    session.presentationContextProvider = self
    session.start()

How to diagnose

  1. Context — WebView or system browser?
  2. Source — In-app browser of another app?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

401 — 401 Bearer error="invalid_token" (HTTP)401403 — 403 Bearer error="insufficient_scope" (HTTP)403access_denied — OAuth 2.0 Error: access_denied (The user or authorization server denied the request) (Authentication)access_deniedauth/account-exists-with-different-credential — Firebase Auth: account exists with a different credential (same email, other provider) (Google Cloud / Firebase)auth/account-exists-w…auth/popup-closed-by-user — Firebase Auth: auth/popup-closed-by-user / auth/popup-blocked / auth/cancelled-popup-request (Authentication)auth/popup-closed-by-…auth/unauthorized-domain — Firebase Auth: auth/unauthorized-domain — This domain is not authorized for OAuth operations for your Firebase project (Authentication)auth/unauthorized-dom…bad_verification_code — GitHub OAuth: {"error":"bad_verification_code","error_description":"The code passed is incorrect or expired."} (Authentication)bad_verification_codedeleted_client — Google OAuth: Error 401: deleted_client — The OAuth client was deleted (Authentication)deleted_clientdisallowe…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.