I'm developing a mobile application with Ionic and I have to connect with the Twitter API.
So I use ng-cordova and $cordovaAuth
. But when I do :
$cordovaOauth.twitter(clientId, clientSecret);
I got the following error :
error Error: Chosen SHA variant is not supported at Error (native) at new t (http://192.168.1.19:8100/lib/sha-js/sha1.js:12:276) at Object.createSignature (http://192.168.1.19:8100/lib/ngCordova/dist/ng-cordova.js:6120:38) at Object.twitter (http://192.168.1.19:8100/lib/ngCordova/dist/ng-cordova.js:5623:55) at Object.initialize (http://192.168.1.19:8100/js/services/twitter.js:18:18)
So, the problem comes from the sha1.js
, I included this in my index.html
It would be nice if you could help me!
Finally, the last version of jsSHA doesn't work with ngCordova. It works with the version 1.6.0 See : https://github.com/nraboy/ng-cordova-oauth/issues/93#issuecomment-113279865
It seems that the new version of jsSHA is not supported. Use version 1.6.0 of jsSHA instead. versions jsSHA
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With