OpenID returnURL fix (Google Hybrid fix)
The current openId module was creating a RelyingParty with a return URL before a hostname could properly be detected. I delayed the instance created until a request is available, otherwise services like google hybrid does not work.
I had trouble getting this patch to work; verifyAssertion in verifyAttributes (line 37) is failing with "cannot call method verifyAssertion of undefined" I think the relyingParty is not transferring over from sendToAuthenticationURI. Perhaps it's just my implementation, but I think it would be easier just to update the documentation with this one line:
.myHostname('localhost:3000')
That fixed the issue immediately for me.
Although now that I think of it, if it could detect hostname automatically that would probably be ideal.
I had fixed this in express 3 so it may not be compatible. @kyriesent The problem I ran into, was the hostname detection requires a request to be available, but at the time myHostname is set, that request isn't available. I have a fix working in the expres3 branch pull request but it may not in this, may need to revisit.