Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Disallowed useragent using Google OAuth #159

Open
BarnumD opened this issue Dec 12, 2016 · 25 comments
Open

Disallowed useragent using Google OAuth #159

BarnumD opened this issue Dec 12, 2016 · 25 comments

Comments

@BarnumD
Copy link

BarnumD commented Dec 12, 2016

It seems that google has changed their OAuth requirements so that web views no longer work.
http://stackoverflow.com/questions/40591090/403-error-thats-an-error-error-disallowed-useragent
https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html

This issue is causing us not to be able to use the rocket.chat app on any IOS devices. We recieve the following after clicking on the google login button on the login screen.
image
Rocket.Chat Server version 0.46.0

Originally posted on RocketChat/Rocket.Chat#5103

@adirwilliamson
Copy link

We are also seeing this message on iOS devices with Google oAuth. This is a real issue for us as we are only using Google oAuth for Rocket.Chat.

Android app still appears to work.

@Sravanik84
Copy link

Any solution for this issue found? My app is blocked with this issue.

@felixkm
Copy link

felixkm commented Jan 27, 2017

We've just released a blog post how to solve that issue on Android and iOS. Maybe it helps. https://cloudrail.com/solving-disallowed_useragent-for-google-services/

@IsraelSistemas
Copy link

@Sravanik84 you can override the user agent in config.xml

Just add this to your config.xml, worked for me.

<preference name="OverrideUserAgent" value"Mozilla/5.0 Google" />

@BarnumD
Copy link
Author

BarnumD commented Jan 27, 2017

Thanks for that workaround @felixkm. I would like to see this solved by RocketChat though.

@marcusgrando
Copy link

+1

@juanrhino
Copy link

+1 Are we gonna have a version with that change? In our company we only use Gmail with OAUTH, and is really annoying to use the Web Version in your phone.

@napcat
Copy link

napcat commented Mar 8, 2017

@IsraelSistemas Thank for that suggestion.

The error disappeared. =) I also have the Facebook oauth integration in my app, but the facebook oauth page now does not load the mobile version. It loads the webpage.

Any suggestion?

EDIT
With the @IsraelSistemas suggestion, the page loads, the credentials are used, but on the last step it does not return the token. =(

@mohsinking2
Copy link

Facebook and twitter providing there services to app also.

@brynn-macpherson
Copy link

Any progress on this issue? I'm in the process of working on a deployment for switching my entire studio from Slack to RocketChat and this is a blocker from us proceeding.

Found a workaround temporarily. If you have oauth authentication working already, you can add a password to the user and then login using those credentials rather than oauth. So the bulk of the users can simply use oauth, but ones that need mobile can have the workaround.

@TamilRaja
Copy link

TamilRaja commented Mar 17, 2017

Same issues coming from google calendar api. what will do? Can you pls tell suggestion. I have used swift3

@adam-kulagowski
Copy link

Same here - currently it's impossible to log in with Google Oauth. This makes this app useless also for android devices.

@feyzilim
Copy link

feyzilim commented Jun 3, 2017

@IsraelSistemas thank's this realy working.

@just4give
Copy link

@IsraelSistemas your fix really worked for google login but introduced some other issues. As @napcat mentioned, facebook login page does not load mobile view. Also I have admob ads which does not get any ad data after this change.

@isaac2lord
Copy link

How should we work around this issue on iPhone? Given that this is the only ios device I have

@umashankarpandey
Copy link

Facing same error in SocialAuth Android

@shivakrishnako-Kore
Copy link

 "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"

override useragent with above string it will works

@GummiBearCA
Copy link

@Israelsystemas where do i put that inside my config.xls?

@GummiBearCA
Copy link

I meant Xml and idk how to edit. Oops

@alejo7
Copy link

alejo7 commented Mar 7, 2018

@napcat Do you solved it ?

@kirantpatil
Copy link

kirantpatil commented Jun 1, 2018

We tried both and results in same issue. Please let me know how to resolve this issue.

> <preference name="OverrideUserAgent" value="Mozilla/5.0 Google" />
> 
> and 
> 
> <preference name= "OverrideUserAgent" value="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" />

@egiesem
Copy link

egiesem commented Jun 18, 2018

@Nemra1
Copy link

Nemra1 commented Aug 12, 2018

@IsraelSistemas you saved my day..thank you

@feyzilim
Copy link

feyzilim commented Aug 13, 2018 via email

@dimater
Copy link

dimater commented Mar 31, 2020

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests