Permalink
Browse files

Merge pull request #379 from genuisereal/patch-2

OpenID sendToAuthenticationUri lacks promise
  • Loading branch information...
bnoguchi committed Mar 7, 2013
2 parents be92f60 + dabe6fc commit 9acac6dfc0c428d5433e59ed67035d28e5d188b7
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 9acac6d

Please sign in to comment.