I am one the final piece of an etrade oauth integration- (i.e. sending the GET request for access token.) This oauth is taking place in the meteor.js environment so all code is written in javascript.
Currently I am getting a 401 error - oauth_problem=signature_invalid response from etrade. After much scientific research, according to the law of large averages, and partially because I am a genius, I have come to the conclusion I have an invalid signature.
Using this wikipedia article https://en.wikipedia.org/wiki/Hash-based_message_authentication_code (node.js section) and this oauth documentation https://dev.twitter.com/oauth/overview/creating-signatures I wrote the following code:
var signature = encodeURI(secretKey)
signature = signature + "&" + encodeURI(contentArr.oauth_token_secret);
hmacSignature = Crypto.createHmac('sha1', signature);
hmacHash = hmacSignature.digest('hex');
hmacHash is the variable I pass as the oauth_signature parameter for my access token get request but no go :/ Still get the signature_invalid error message. Any suggestions ??? Obviously if you give me a good answer, I will mark it as accepted.
Thanks in advance. :)