Not really a bug, since it’s not Discourse’s fault at all, so I figured I’d stick this in support.
Flipped on Google/Yahoo/Twitter authentication today at the request of a user, and because eh, why not—I personally would never use it, but I don’t have to It took a while to figure out exactly what had to go where on dev.twitter.com to make stuff work, but I eventually found all the right fields to fill out, thanks to to past postings here on meta.
Ran into one final issue, when actually attempting to log on with a Twitter account. The initial request to grant access to my twitter account went fine, and I saw the correct Twitter-provided username & password window. However, after entering credentials and requesting access, I got a blank page served up by my web server. It looked like the page title had twitter authentication stuff in it, and it was coming from port 8881.
I figured this problem must have something to do with Varnish and Nginx; I run my instance of Nginx on port 8881, with Varnish listening on port 80 and passing/piping/caching requests as needed. Fortunately, I didn’t have to figure out the problem myself, as some kind soul had already done so.
For future reference, the problem was that Passenger needed to be made aware that it should pretend it’s on port 80. I added the following line in the
server sections (both http and https) of my Nginx Discourse virtual host configuration:
passenger_set_cgi_param SERVER_PORT 80;
Problem solved! Twitter authentication now works correctly. Hope this is helpful to someone