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

Some fix I have made #181

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mWebView.setVisibility(View.VISIBLE);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setUserAgentString("Mozilla/5.0 Google");
mWebView.getSettings().setUserAgentString("Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0");


LayoutParams layoutParams = this.getFullscreenLayoutParams(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,23 +264,15 @@ private static ServiceBuilder _oauth2ServiceBuilder(
String scopes = "";
if (cfg.containsKey("scopes")) {
scopes = (String) cfg.get("scopes");
String scopeStr = OAuthManagerProviders.getScopeString(scopes, ",");
String scopeStr = OAuthManagerProviders.getScopeString(scopes, " ");
builder.scope(scopeStr);
}

boolean rawScopes = (cfg.containsKey("rawScopes") && ((String)cfg.get("rawScopes")).equalsIgnoreCase("true"));

if (opts != null && opts.hasKey("scopes")) {
scopes = (String) opts.getString("scopes");
String scopeStr = null;

if (!rawScopes)
scopeStr = OAuthManagerProviders.getScopeString(scopes, ",");
else
scopeStr = scopes;

String scopeStr = OAuthManagerProviders.getScopeString(scopes, " ");
builder.scope(scopeStr);
}
}

if (callbackUrl != null) {
builder.callback(callbackUrl);
Expand All @@ -296,7 +288,7 @@ private static String getScopeString(
final String scopes,
final String joinBy
) {
List<String> array = Arrays.asList(scopes.replaceAll("\\s", "").split("[ ,]+"));
List<String> array = Arrays.asList(scopes.replaceAll("\\s", "").split("[,]+"));
Log.d(TAG, "array: " + array + " (" + array.size() + ") from " + scopes);
return TextUtils.join(joinBy, array);
}
Expand Down
12 changes: 0 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@
"react": "*",
"react-native": "*"
},
"rnpm": {
"commands": {
"prelink": "node_modules/react-native-oauth/bin/prepare.sh",
"postlink": "node_modules/react-native-oauth/bin/cocoapods.sh"
},
"ios": {
"project": "ios/OAuthManager.xcodeproj"
},
"android": {
"packageInstance": "new OAuthManagerPackage()"
}
},
"dependencies": {
"invariant": "^2.2.1",
"valib": "^2.0.0"
Expand Down