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 not working in Android #135

Open
vijayst opened this issue Aug 2, 2017 · 2 comments
Open

Google oAuth not working in Android #135

vijayst opened this issue Aug 2, 2017 · 2 comments

Comments

@vijayst
Copy link

vijayst commented Aug 2, 2017

Google oAuth is not working for Android. I get an error - user agent not allowed in Android.

screen shot 2017-08-02 at 6 52 43 pm

@dieseldjango
Copy link

This is due to Google disallowing embedded webviews for authorization: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html.

The Android implementation in this package uses a webview. It needs to be updated to use a Chrome tab, as described by Google. There's a hack in #130 to make it work, but that's going against Google's instructions on how to properly do authorization on android.

@ericchan3721
Copy link

Better using the user's actual UserAgent and replace wv from it instead of the hard coded one
mWebView.getSettings().setUserAgentString(mWebView.getSettings().getUserAgentString().replace("; wv", ""));

Ref: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html

P.S. I have open the PR for this issue, however this library seems no longer supported by the original author, you may consider using other OAuth RN library.

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

3 participants