Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise and this reference caused uncaught exception in openid module sendToAuthenticationUri step #287

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

genuisereal
Copy link
Contributor

  1. Openid module sendToAuthenticationUri step did not provide correct Promise object reference to use inside this.relyingParty.authenticate callback function. Also call back function did not fulfill promise(caused timeout error) and step itself did not return promise reference (caused uncaught exception).

  2. this.redirect in this.relyingParty.authenticate callback function thrown exception because this in the context did not have redirect method. Thus self was defined in outer context and self.redirect invoked.

kaizenpack and others added 14 commits May 24, 2012 00:27
password was not being deleted.
Changed github apiHost url and fetchOAuthUser to work with github api v3
…e object reference to use inside this.relyingParty.authenticate callback function. Also call back function did not fulfill promise and step itself did not return promise reference.

2) this.redirect in this.relyingParty.authenticate callback function thrown exception because this in the context did not have redirect method. Thus self was defined in outer context and self.redirect invoked.
@genuisereal
Copy link
Contributor Author

It is about the same problem as described here #271 but that solution was not counting for absent Promise object reference which also causing exception

…pperared. which led to the conclusion that added Promise does not solve the problem as long as if we analyze the initialization of the step it clearly says that no promoses are expected to be returned.


Thus condition `if(err) return p.fail(err);` seems now incorrect. And must be removed.
Finally working solution is found. `sendToAuthenticationUri` now correctly return fulfilled promise in normal case and fails if error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants