Closed jheinnic closed 7 years ago
As a side note... While preparing my pull request I happened to grep this branch's version of the URIParser against the master. It looks like this is a regression that is not present on the master branch.
I noticed, but did not fix, the same kind of error I've reported for fragment mode also present for query parameters. The code is around line 95 of the same file and its a little more than a one line fix, but it is not a terribly complicated one all the same. Two lines instead of just one, and a little more context to read around it as well.
I've gone ahead and tacked an addendum onto the PR with an offering that corrects the issue for query parameters as well.
Cheers!
I'm currently attempting to use this library with the following init options:
With the latest 0.9.1 release, I've no problem getting a call to login() to redirect to my authentication form and return with an access token, but the application never detects the successful authentication by firing true value down either authenticatedObs or authenticateSuccessObs.
Digging into the code a little bit, I tracked the problem into the URIParser utility used by the callback to extract the required input from the browser's current location. The "oauth" structure it returns currently looks like this:
It looks like a fairly easily corrected error near the bottom of the URIParser file. In the loop where it is copying values from the hash of parsed fragment key/value pairs it is simply assigning the keys it is iterating over instead of their de-referenced values.
I hacked my workspace by changing line 126 of this block:
... to copy the value for each required key instead of setting the key itself ...