Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chosen SHA variant is not supported

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!

like image 439
GuillaumeP Avatar asked Jun 18 '15 13:06

GuillaumeP


2 Answers

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

like image 195
GuillaumeP Avatar answered Nov 15 '22 07:11

GuillaumeP


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

like image 20
Andres Quesada Avatar answered Nov 15 '22 08:11

Andres Quesada