since qt web engine doesn't work for anyone and Suno doesn't allow custom hooks I'm the url then:
To enable Google OAuth in a C++ desktop app (bypassing Qt WebEngine issues), use a lightweight, embeddable webview library that allows setting a custom mobile User-Agent, simulating an Android browser. Microsoft/webview2 (Windows) or zserge/webview (cross-platform) are recommended, configured to emulate mobile device headers.
blog.google
blog.google
+3
Key Implementation Steps
Set Mobile User-Agent: Configure the webview to send a mobile UA string (e.g., Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36...).
Handle OAuth Redirects: Use a "Loopback IP" (127.0.0.1) for the OAuth callback URL, which is the secure, recommended method for native apps.
Intercept Auth Code: Monitor the webview navigation for the callback URL, extract the code parameter, and exchange it for tokens via your C++ backend.
Google for Developers
Google for Developers
+2
Recommended Libraries
WebView2 (C++/WinRT): Best for Windows desktop, supports modern web standards.
zserge/webview: Lightweight C/C++ cross-platform wrapper (uses Edge/Webkit/WebKitGTK based on OS).
Google Security Requirement
Do not use embedded webviews for the entire login flow if possible, as Google restricts this due to security risks (man-in-the-middle). The preferred method is using system browsers or Android Custom Tabs to handle authentication.
blog.google
blog.google
+1
blog.google
since qt web engine doesn't work for anyone and Suno doesn't allow custom hooks I'm the url then: