You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
for (const param in fragmentParams) {
if (param) {
oauth[param] = param;
}
}
... to copy the value for each required key instead of setting the key itself ...
for (const param in fragmentParams) {
if (param) {
oauth[param] = fragmentParams[param];
}
}
I'm having a little trouble working out how to build and run tests for this project, or I would have tried to attach a test case along with this issue and the associated pull request, but didn't want that to keep me from offering the tip. Would be great to be able to drop the one liner patch from my README file--so far the rest of my experience with this library has been very smooth. Thanks for putting it up!
The text was updated successfully, but these errors were encountered:
Hi,
Tanks for your contribution. I will provide a new version including this fix.
I agree with you, some relevant unit tests should be added to the project ;)
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 ...
I'm having a little trouble working out how to build and run tests for this project, or I would have tried to attach a test case along with this issue and the associated pull request, but didn't want that to keep me from offering the tip. Would be great to be able to drop the one liner patch from my README file--so far the rest of my experience with this library has been very smooth. Thanks for putting it up!
The text was updated successfully, but these errors were encountered: