سؤال

I'm using passport.js to implement Google OpenID authentication for my webapp. However, I'm not sure what's the best way to specify the returnURL.

Right now I set my server hostname in a config file, like this

server.host = 'http://foo.bar.com:5990'

But hardcoding the server URL there seems silly to me.

Is there any way to tell passport.js or Google OpenID auth to return to the same domain it started from?

هل كانت مفيدة؟

المحلول

Actually, turns out I can just use a relative URL in the returnURL and it will work. :-)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top