Chosen SHA variant is not supported

3.8k Views Asked by At

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!

2

There are 2 best solutions below

0
On BEST ANSWER

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

0
On

It seems that the new version of jsSHA is not supported. Use version 1.6.0 of jsSHA instead. versions jsSHA