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:

https://accounts.google.com/o/oauth2/v2/auth?client_id=813505898895-9vocl0haapnp562pn1hmut2sibregabn.apps.googleusercontent.com&response_type=code&scope=openid%20profile%20email2%www.http: //openid%20profile%20email2% www. 2Fauth1% 2Fsign-in% 2Fgoogle & state = 6515338772758876.% 2F

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.

https://accounts.google.com/o/oauth2/v2/auth?client_id=831371170934-udapit5jhjj56pft5l2drc9gjhfeclf3.apps.googleusercontent.com&response_type=code&scope=openid%20profile%20em=code&scope=openid%20profile%20em%20em% -firect appspot.com% 3Fid% 3Dauth58372 & state = 6515338772758876.% 2F

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*

.

+3
google-oauth google-api


source to share


No one has answered this question yet

Check out similar questions:

1
How can I set X-Frame-Options => ALLOWALL for accounts.google.com (OAuth) account?
1
Google OAuth 2.0 Titanium API: Missing required parameter: response_type
1
Realm did not match redirect_uri / origin. Error code: 2
1
Authorizing multiple Google accounts for one Google Drive API
1
Google+ login error: invalid_request
0
How to Re-authenticate a User with Google Oauth2
0
Google OAuth2 response_type error in authorization code request
0
Google Oauth 2.0 with non-web app (Windwos / Mobile app) showing offline access browse screen
0
Error using custom port in redirect_uri in google oauth2.0
0
Google OAuth 2.0 request format



All Articles
Loading...
X
Show
Funny
Dev
Pics