Hello guys, so after hours of googling and help from jesonelle forum, I have been able to fix the Google aouth problem (403 useragent_disallowed)
So the problem google has with webview apps is security, that is why they block the service.
to solve that we need to assign a user agent.
-
Update the index.jason file to the following;
{
â$jasonâ: {
âbodyâ: {
âbackgroundâ: {
âtypeâ: âhtmlâ,
âurlâ: âhttps://www.YOUR-DOMAIN.comâ,
âoptionsâ: {
âuseragentâ: âhttp.agentâ
},
âactionâ: {
âtypeâ: â$defaultâ
}
}
}
}
} -
Replace âhttp.agentâ with
âMozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36â -
Replace the index file on your bubble app with the new one.
-
In android studio, Search forJasonAgentService.java. Check to make sure it contains the following lines of code.
if (options.has(âoptionsâ)) {
// Allows custom user agent for the webview
if (options.getJSONObject(âoptionsâ).has(âuseragentâ)) {
Log.d(âDebugâ, "Using custom user agent: " + options.getJSONObject(âoptionsâ).getString(âuseragentâ));
settings.setUserAgentString(options.getJSONObject(âoptionsâ).getString(âuseragentâ));
}
}
Thatâs it. your google oauth should work now⌠Happy bubbling