-
Notifications
You must be signed in to change notification settings - Fork 447
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
genuisereal
wants to merge
19
commits into
bnoguchi:master
Choose a base branch
from
genuisereal:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
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.
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
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
sendToAuthenticationUri
step did not provide correctPromise
object reference to use insidethis.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).this.redirect
inthis.relyingParty.authenticate
callback function thrown exception becausethis
in the context did not haveredirect
method. Thusself
was defined in outer context andself.redirect
invoked.