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

Open
wants to merge 19 commits into
from

Projects

None yet

6 participants

@genuisereal

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 some commits May 24, 2012
@kaizenpack kaizenpack added smarterer oauth 0b504c9
@ebaizel ebaizel password was not being deleted. be51e02
@jacksonp jacksonp Changed example scope for Google OAuth2 to one that works. 40ef8aa
@bnoguchi Merge pull request #280 from jacksonp/master
Readme Fix for Google OAuth2
545751c
@bnoguchi Merge pull request #275 from ebaizel/patch-2
password was not being deleted.
fd7d567
@kaizenpack kaizenpack Merge branch 'master' of https://github.com/bnoguchi/everyauth 1b986b6
@kaizenpack kaizenpack added smarterer to README 9794626
@kaizenpack kaizenpack added full detail section ae046f3
@kaizenpack kaizenpack fixed indentation issue f792d7a
@hostalerye hostalerye Now using Github api v3 be7c423
@bnoguchi Merge pull request #281 from kaizenpack/master
include smarterer oauth
784547f
@bnoguchi Merge pull request #282 from hostalerye/master
Changed github apiHost url and fetchOAuthUser to work with github api v3
9f2c438
@genuisereal genuisereal 1) Openid sendToAuthenticationUri step did not provide correct Promis…
…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.
e1bf208
@genuisereal genuisereal minor styling bd8a8e8
@genuisereal

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

genuisereal added some commits Jun 20, 2012
@genuisereal genuisereal Fix: after testing with non working openid provider new error issue a…
…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.
bea944b
@genuisereal genuisereal Minor fix 3b894d6
@genuisereal genuisereal Minor fix 06ea58d
@genuisereal genuisereal Fix: correct error handling implemented
Finally working solution is found. `sendToAuthenticationUri` now correctly return fulfilled promise in normal case and fails if error.
3d60247
@genuisereal genuisereal Fix: extra parameter removed e3dba27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment