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

Fix login Facebook and Google issues #238

Open
wants to merge 4 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,6 +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 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19");


LayoutParams layoutParams = this.getFullscreenLayoutParams(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ public void authorize(
final String authVersion = (String) cfg.get("auth_version");
Activity activity = this.getCurrentActivity();
FragmentManager fragmentManager = activity.getFragmentManager();
String callbackUrl = "http://localhost/" + providerName;
String callbackUrl;
if (providerName.equals("facebook")) {
callbackUrl = "https://localhost/" + providerName;
} else {
callbackUrl = "http://localhost/" + providerName;
}

OAuthManagerOnAccessTokenListener listener = new OAuthManagerOnAccessTokenListener() {
public void onRequestTokenError(final Exception ex) {
Expand Down
5 changes: 5 additions & 0 deletions ios/OAuthManager/OAuthManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ - (dispatch_queue_t)methodQueue
return dispatch_queue_create("io.fullstack.oauth", DISPATCH_QUEUE_SERIAL);
}

+ (BOOL)requiresMainQueueSetup
{
return YES;
}

+ (instancetype)sharedManager {
dispatch_once(&onceToken, ^{
manager = [self new];
Expand Down