How to setup sync gateway authentication using google login

Based on the documentation I should be implementing a custom authentication using my own server as per The issue is the last bit “Subsequent client requests to the gateway will now include the session in a cookie, which the gateway will recognize. For the cookie to be recognized, your site must be configured so that your app’s API and the gateway appear on the same public host name and port” . Does this mean I to get my custom logic running on the same webserver as the sync gateway? (I tried running the sync gateway on port 80 but this won’t work because the apache server is already using this port)


I have not tried this but I guess the easiest way will be to put for example an Apache server and use mod_proxy to the Sync Gateway, like that you will have the same hostname and port all the way. ( )