Closed sukanyasubramanian closed 10 years ago
Hi,
Did you add the <access origin="[URL]"/>
tags in the config.xml file? The "NSURLErrorDomain" seems to be linked with the fact that one of the APIs domain or OAuth.io's site is not trusted.
Does that happen when you call the popup
method?
Also, if you want to have the errors returned by the SDK in a more direct way, you can use Weinre which will give you a console similar to Google Chrome's.
Thanks for your feedback, Hope that helps :)
Hi,
I have set permission to all the domains in the config.xml by adding
Thanks, Sukanya
If I understand well, you send two request to login to Google Plus, is that right? Are you using the popup method to do that? Normally, you should only call the popup once during the app runtime, and reuse the response to perform requests to the API (using the .get(), .post(), .put(), .patch(), .del() and .me() methods).
The flow should look something like this:
// 1. initialization
OAuth.initialize('your_key');
// 2. authentication
var api = undefined;
OAuth.popup('google_plus')
.done(function (response) {
api = response;
})
.fail(function (e) {
console.log(e);
})
// 3. requests (for example using the me() method)
if (api) {
api.me()
.done(function (user) {
console.log(user.name);
})
.fail(function (e) {
console.log(e);
});
}
Hope this helps
We are using oauth plugin in our application for login.I send a login request to google plus using valid credentials.Before this process is completed a second request is triggered by tapping on the signin button again,the following error is thrown.
Error code in iPad console :2014-05-08 16:25:30.116 rpad_plos[2270:907] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSU RLErrorDomain error -999)