Skip to content

v2.0.0

Compare
Choose a tag to compare
@ddo ddo released this 11 Sep 13:56
· 36 commits to master since this release

change:

  • rename consumer.public to consumer.key
var oauth = OAuth({
    consumer: {
        key: '<your consumer key>',
        secret: '<your consumer secret>'
    },
});
  • remove CryptoJs dependency, make PLAINTEXT as default signature method

read more here: https://github.com/ddo/oauth-1.0a#crypto

var crypto = require('crypto');
...

var oauth = OAuth({
    consumer: {
        key: '<your consumer key>',
        secret: '<your consumer secret>'
    },
    signature_method: 'HMAC-SHA1',
    hash_function: function(base_string, key) {
        return crypto.createHmac('sha1', key).update(base_string).digest('base64');
    }
});

fix:

  • fix empty GET param