Promise and this reference caused uncaught exception in openid module sendToAuthenticationUri step#287
Open
genuisereal wants to merge 19 commits intobnoguchi:masterfrom
Open
Promise and this reference caused uncaught exception in openid module sendToAuthenticationUri step#287genuisereal wants to merge 19 commits intobnoguchi:masterfrom
genuisereal wants to merge 19 commits intobnoguchi:masterfrom
Conversation
Readme Fix for Google OAuth2
password was not being deleted.
include smarterer oauth
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Openid module
sendToAuthenticationUristep did not provide correctPromiseobject reference to use insidethis.relyingParty.authenticatecallback function. Also call back function did not fulfill promise(caused timeout error) and step itself did not return promise reference (caused uncaught exception).this.redirectinthis.relyingParty.authenticatecallback function thrown exception becausethisin the context did not haveredirectmethod. Thusselfwas defined in outer context andself.redirectinvoked.