Nginx proxy with Google OAuth 2.0 Nginx proxy with Google OAuth 2.0 nginx nginx

Nginx proxy with Google OAuth 2.0


You should rewrite the Location headers that your backend sends to Nginx described in http://wiki.nginx.org/HttpProxyModule#proxy_redirect, so:

proxy_redirect http://localhost:3000/_oauth/google http://sub.example.com/_oauth/google;

the other option, that would work for popup-style login as well is to set the ROOT_URL environment variable for Meteor at startup as follows:

ROOT_URL="http://sub.example.com" PORT=3000 node main.js