-
Notifications
You must be signed in to change notification settings - Fork 34
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
After login it's redirect me to the "redirect_url" #23
Comments
Yes, with cordova you don't want to be redirected to an external page but return to your app. How can this be done? |
@blokeish This plugin is not opening external web browser window, it is opening a webview within the app, so when redirect happens it just closes the webview modal view. Its always in the app. @sameh-serag you can just put your domain url for redirect url, its not really using it, just grabbing url-param, so does not matter contents of the page |
Thanks krisrak, that make sense. I will try it out and see how it goes.. |
Ok, I figured a solution to this. Firstly, the latest version of Cordova's InAppBrowser doesn't use The fix would be to change line 85 inside cordova.oauth2.js to
This should fix the issue. Also, remember to import in InAppBrowser to your project: and also, remember to include cordova.js inside your tag:
This was the solution that worked for me. |
i tried your example.
function oauth2_login() {
$.oauth2({
auth_url: 'https://www.facebook.com/dialog/oauth',
response_type: 'token',
client_id: 'XXXXXXXXXXX',
redirect_uri: 'http://www.zonnix.net',
other_params: {}
}, function(token, response){
// makeAPICalls(token);
return;
}, function(error, response){
console.log(error);
return;
});
when i tried it in the emulator ... after successful login the page redirected to the "redirect_url"
Please could u tell me how to avoid the redirect. The facebook force me to insert "redirect_url" related to my valid domain
The text was updated successfully, but these errors were encountered: