I imported the package in my angular project, my issue is that the function generate an invalid oauth signature. I tried to match it http://bettiolo.github.io/oauth-reference-page/ with the same data/parameters but the oauth signature does not match. Here's my code.
var httpMethod = 'GET';
var url = 'https://api.xero.com/oauth/RequestToken';
this.parameters = {
oauth_consumer_key : '<consumer key>',
oauth_nonce : '366871832',
oauth_timestamp : '1521616286',
oauth_signature_method : 'HMAC-SHA1',
oauth_version : '1.0'
};
var consumerSecret = '<consumer secret>';
var encodedSignature = oauth.generate(httpMethod, url, this.parameters,consumerSecret);
var signature = oauth.generate(httpMethod, url, this.parameters, consumerSecret,
{ encodeSignature: false });
I imported the package in my angular project, my issue is that the function generate an invalid oauth signature. I tried to match it http://bettiolo.github.io/oauth-reference-page/ with the same data/parameters but the oauth signature does not match. Here's my code.