bartve/disconnect — pull request #8 by wxdu (2014-12-31 20:23:45+00:00)
Title: Update client.js

Hi,

I'm currently having a problem with connections to the search API endpoint failing with a 401 error. I did some poking around in the Discogs forums, and other people are having the same problem. It seems to be an issue with how they're doing OAuth signatures at that endpoint (and only that endpoint). Here's the forum thread:
http://www.discogs.com/forum/thread/402590

The workaround is to use PLAINTEXT instead of HMAC-SHA1. The oauth1.0a module defaults to HMAC-SHA1 unless you explicitly tell it otherwise, so I had to modify client.js to specify PLAINTEXT.

I'm a single-user application, so I don't have a full oauth infrastructure built out around Disconnect -- I just hacked something together long enough to get my token & then saved the resulting accessData object.

So this implementation works for me and it *should* work for new consumers as well, but I haven't tested it in a full end-to-end OAuth request cycle.

Cheers,

Ross Grady