Google Oauth2 in embedded browser (webview)
I added Google OAuth2
to my site. I noticed that when opening the website in the embedded browser (webview), the redirect to the google login page (see link below) will fail:
"403 disallowed_useragent".
Here is the link:
I realized that Google no longer allows requests OAuth
to Google in the web view. But here's the weird thing. Google sign in demo
developers.google.com/identity/sign-in/web/sign-in works great when opened in webview. I was able to find client_id
and redirect_uri
used in the demo and replace them with my google auth link (see updated link below), the updated link can now magically open in webview.
Please note that I have changed only client_id
and redirect_url
nothing else. I later found more client_ids
that works with webview too. I am wondering if there are any specific settings for these client_ids to work?
Also I want to know what is recommended to fix:
"403 disallowed_useragent"?
My site doesn't have its own app. And most likely, people will just open the website they received from the online chat. I don't want to show:
"403 disallowed_useragent"
error when they click *sign-in by Google*
.
source to share
No one has answered this question yet
Check out similar questions: