Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google OAuth - disallowed_useragent on Mobiles using SignIn Card #3659

Closed
varunreddycs opened this issue Oct 24, 2017 · 6 comments
Closed

Google OAuth - disallowed_useragent on Mobiles using SignIn Card #3659

varunreddycs opened this issue Oct 24, 2017 · 6 comments
Assignees

Comments

@varunreddycs
Copy link

Bot Info

  • App ID: a11040e1-1284-49da-a94b-3cf380bc4097
  • SDK Platform: .NET
  • SDK Version: 3.5
  • Active Channels: Skype
  • Deployment Environment: Auzure App Service,

Issue Description

Till recently everything is great.
Recently Google disallowed all the embedded WebViews. This primarily impacts Mobile Apps. So on Skype Mobile, when I click on the Signin Card to get authenticated with Google OAuth, it now fails with disallowed_useragent. The screenshot is shown below. Now what is a neater way to work around this ?

Reproduction Steps

  1. Open Bot on Skype Mobile App (iOS or Android)
  2. LogIn using the signin card
  3. We see disallowed_useragent error. If I open this url on a browser everything works.

Expected Behavior

Able to login using an existing session or allow the user to key in the gmail id and password in the google oAuth credentials screen and logs in with right set of credentials.

Actual Results

Well this is the error i get
1508834247703

@JasonSowers
Copy link
Contributor

This is probably a better question for stack overflow since the change by Google effected more than just the use in bot framework. A broader audience may prove better at finding a workaround.

@nwhitmont
Copy link
Contributor

nwhitmont commented Oct 24, 2017

@varunreddycs This error is not specific to Bot Framework or BotBuilder SDK. The change to Google's policy was announced in August 2016.

For more information, try a quick Google search, or check the notes on this Stack Overflow post:
https://stackoverflow.com/questions/40591090/403-error-thats-an-error-error-disallowed-useragent

@Vkrish-Nimmagadda
Copy link

@JasonSowers @nwhitmont The link that was given above is to go ahead and tweak the App itself (iOS or Andrioid). How can we do that for Skype on iOS or Android as the Bot is hosted by Skype App on the Mobile platform. But @varunreddycs probably wants to know how to hit the Google APIs on a button click of the SignIn Card of the Bot Framework. Is there a way to change the user-agent such that we could directly launch a browser in the Mobile as opposed to the default WebView ? Any API from within the BotFramework ? Any work around is probably what @varunreddycs might be needing. So the question is kind of on the cusp more inclining towards botframework. Because one should be able to set it without doing any code specific to iOS or Andriod from within the Bot code. I hope I am not missing anything quite basic. If it is valid, we should reopen this issue.

@varunreddycs
Copy link
Author

@JasonSowers @nwhitmont what @Kris-Nimmagadda commented is exactly i was looking for.Any way to launch a browser other than WebView or other way around.I hope this issue will reopen

@egiesem
Copy link

egiesem commented Jun 18, 2018

@gowrav
Copy link

gowrav commented Jun 19, 2018

@egiesem ..
You saved a life ;) . but try this public static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0"; mWebView.getSettings().setUserAgentString(USER_AGENT);

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

No branches or pull requests

7 participants