Comments (27)
So you get an $http response that contains the access token and a problem authenticating message?
Are you using ngCordovaOauth or the version I bundled with ngCordova? Also any code you can share would be great.
It is a possibility the API changed, but it is unlikely. Have to see whats up.
Thanks,
from ng-cordova-oauth.
I am using the one bundled with ngCordova. I cannot trace the $http response, as it always resolves to .error() with all parameters empty. However, in the proxy, I see the correct (working) token sent by linkedin.
I created a new, blank project following your instructions here http://ionicframework.com/blog/oauth-ionic-ngcordova/ but it doesn't work
I could send my app credentials via private message if that's ok for you
from ng-cordova-oauth.
Code would be preferred. I can use my own credentials to test.
from ng-cordova-oauth.
I put my index.html here https://gist.github.com/MarcSallent/c67a49852bf5d5d5d625
and the app.js here https://gist.github.com/MarcSallent/15e91d0cce8fb757c58b
Thanks
from ng-cordova-oauth.
Your app.js is very basic and seems correct. I'll see about testing this tonight to see if maybe the API changed.
Regards,
from ng-cordova-oauth.
Hello!
Were you able to take a look at it?
Thanks!
marc
from ng-cordova-oauth.
I haven't had a chance to look at it. Been very busy, sorry. Starting tomorrow (2/10) I'll be away from my computer for about two weeks.
from ng-cordova-oauth.
I just tested again and had no issues. Can you try using the ngCordovaOauth rather than the version I have bundled with ngCordova?
from ng-cordova-oauth.
Closing this ticket since I cannot reproduce the problem and have not heard from the reporter.
from ng-cordova-oauth.
Hi guys,
i have the same problem using linkedIn. Did you look into ?
When i try to login with linkedin, the http.post request always go into the error function.
Here is my controller :
$cordovaOauth.linkedin('PUBLIC', 'SECRET', ['r_emailaddress', 'r_network'], '0987654321')
.then(function (result) {
console.log('Result', JSON.stringify(result));
}, function (error) {
console.log('Error', error);
});
My log :
Problem authenticating
And after adding log into ng-cordova.js, status equal 0 and there is no data.
from ng-cordova-oauth.
I don't normally request for this, but can you share with me the clientId and clientSecret you're using?
I want to try to use my code to test against your registered application to see if it is an issue with how you configured your app in the LinkedIn dashboard.
When we're done, you can delete your app and register a new set of keys.
Regards,
from ng-cordova-oauth.
I don't use email, so you'd have to put your keys in this issue thread.
Like I said, just regenerate your keys when we're done to prevent unauthorized use.
Regards,
from ng-cordova-oauth.
I've got them. I'll test it out tonight when I'm home and circle back.
from ng-cordova-oauth.
Thank you a lot for your time.
from ng-cordova-oauth.
I tried with your keys, scope, and state. I had no problems.
I have to leave this issue closed because I cannot reproduce the issue.
Regards,
from ng-cordova-oauth.
I'm experiencing this as well actually, has anyone solved it?
from ng-cordova-oauth.
Can you share how to reproduce?
from ng-cordova-oauth.
Sure @nraboy . I created a new ionic app ionic start myApp sidemenu
. Changed the following for the app:
- Ionic version updated to: 1.0.0-rc.0 :
ionic lib update
- Added the last
angular.module('starter', ['ionic', 'starter.controllers', 'ngCordovaOauth'])
to app.js - Added the $cordovaOauth to the controller.js
.controller('AppCtrl', function($scope, $ionicModal, $timeout, $cordovaOauth)
- Added ng-cordova-oauth.min.js to www/js
- Added the InAppBrowser plugin
- Added the ios platform
- Added
<script src="js/ng-cordova-oauth.min.js"></script>
to index.html underneath cordova.js inclusion - Replace the code to the boilerplate
doLogin
method in controllers.js with:
$cordovaOauth.linkedin('KEY', 'SECRET', ['r_basicprofile', 'r_emailaddress'], 'aowiejfoiewj').then (function (result) {
console.log("Response Object -> " + JSON.stringify(result));
}, function(error) {
console.log("Error -> " + error);
});
- Running using
ionic emulate ios -l -c
in iPhone 6 / iOS 8.1 simulator.
Pretty sure that's it. I have a LinkedIn app but nothing strange there.
My problem is that I can access the LinkedIn login screen but upon pressing "Allow and Sign In" button, I get the NOT FOUND webpage and the error callback logs "Problem authenticating".
Note that I DID get my password wrong the first time I tried to log into LinkedIn (shouldn't matter but I'll state it anyway). My LinkedIn account is both an admin and developer for the app. My permissions in the app settings are checked off as 'r_basicprofile', 'r_emailaddress'.
Thanks for the attention!
from ng-cordova-oauth.
Added
<script src="js/ng-cordova-oauth.min.js"></script>
to index.html underneathcordova.js
inclusion
This is a concern. You should be placing ng-cordova-oauth.min.js above cordova.js not underneath.
Also I encourage you to not use live-reload. It is known to have issues with the InAppBrowser plugin. Instead you should do ionic build ios
and then open the project with Xcode. From there you should be testing on the device or simulator.
Hopefully that helps.
Regards,
from ng-cordova-oauth.
Ok I'm going to give it a shot. Thanks Nic.
from ng-cordova-oauth.
Hey @nraboy thanks for the suggestions. It works now that I have taken your advice. However, I'm still seeing the Not Found webpage (/callback) before it brings me back to my app. But this is a separate issue.
from ng-cordova-oauth.
There is a race condition with providers that have a secret key because the POST requests that happen may not finish before the callback loads. In this scenario a page not found comes up without hurting functionality.
I've not been able to solve this problem, but I'm open to suggestions. For implicit grant types, the problem does not exist.
Regards,
from ng-cordova-oauth.
Got the same problem yesterday. Running the app with browserify was leading to a CROSS error :
XMLHttpRequest cannot load linkedin.com/uas/oauth2/accessToken.
Origin http://192.168.180.139:8101 is not allowed by Access-Control-Allow-Origin.
console-via-logger.js:173
and Problem authenticating returned by ng-cordova-oauth.
Works like a charm if you build the ionic project and run it on your device.
from ng-cordova-oauth.
I'm experiencing a similar
error - upon submitting email and pass through the login dialog I instantly get "webView:didFailLoadWithError - -1004"
from ng-cordova-oauth.
tried with github:
2015-09-19 01:31:48.204 github-mobile[6087:23151801] THREAD WARNING: ['InAppBrowser'] took '75.247070' ms. Plugin should use a background thread.
2015-09-19 01:32:00.625 github-mobile[6087:23151801] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2015-09-19 01:32:00.632 github-mobile[6087:23151801] webView:didFailLoadWithError - -1004: Could not connect to the server.
at least auth works
from ng-cordova-oauth.
Yea the InAppBrowser plugin is a bit wonky. Works though :-)
from ng-cordova-oauth.
I am getting this error after getting token and trying to access data with that token.
{"errorCode":0,"message":"Mutiple authentication schemes detected","requestId":"XXXXX","status":401,"timestamp":10110101010}
can you find what is wrong with it ?
from ng-cordova-oauth.
Related Issues (20)
- Twitter oauth not giving me the email HOT 1
- Not able to get email in response in twitter HOT 1
- Login Twitter error HOT 1
- Webpage not loading Facebook Login HOT 2
- How to get refresh token with spotify oauth HOT 3
- Updated Google OAuth Support? HOT 1
- Google errors with "Cannot authenticate via a web browser" HOT 1
- Cannot authenticate via a web browser on device! HOT 8
- "Cannot authenticate via a web browser" HOT 3
- Facebook signin issue in windows platform HOT 2
- How to terminate facebook long lived? HOT 1
- Is Yahoo Oauth comitted?
- Error when loading facebook page HOT 6
- Getting id_token from Microsoft OAuth2.0 using oauthWindowslive
- InAppBrowser not showing firebase authentication in android studio device preview
- Instagram login error (ERR_SPDY_PROTOCOL_ERROR) HOT 1
- Facebook API 2.6 deprecated on 13 July HOT 2
- Facebook requiring https on oauth callback HOT 4
- $cordovaOauth.linkedin returning null data and status -1 in iOS HOT 1
- Office365 login
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-cordova-oauth.