Permalink
Browse files

OpenID sendToAuthenticationUri lacks promise

 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).
  • Loading branch information...
1 parent 6d335c5 commit dabe6fc58ea1b7458337491e6b6584d7f7c4a8ee @genuisereal genuisereal committed Jan 24, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/modules/openid.js
View
@@ -46,6 +46,7 @@ everyModule.submodule('openid')
.promises(null)
.sendToAuthenticationUri(function(req,res) {
var that = this;
+ var p = this.Promise();
// Automatic hostname detection + assignment
if (!this._myHostname || this._alwaysDetectHostname) {
@@ -56,6 +57,9 @@ everyModule.submodule('openid')
if(err) return p.fail(err);
that.redirect(res, authenticationUrl);
});
+
+ p.fulfill();
+ return p;
})
.getSession( function(req) {
return req.session;

0 comments on commit dabe6fc

Please sign in to comment.