title: How to set a proxy server between my web app and google response, with out using third party support?
body: <p>In my app, I have implemented a feature &quot;Sign In With Google&quot; option, in which I am using a google mail id to authenticate the user to my app. the workflow goes like this</p>
  <blockquote>
  <p>User presses the google button, and a page shows up to choose the Gmail id
  After choosing and logging in to the Gmail id, google authenticate the user, and send the data(name, email,...) of the Gmail user logged in.
  As the data will only be sent to a specific top-level domain that I am updated in the google console control panel, but by default, the localhost and the loopback(127.0.0.1) address are authorized automatically.</p>
  </blockquote>
  <pre><code>&lt;div id=&quot;g_id_onload&quot;
   data-client_id=&quot;769060092006-p1547n4dn7fbtua9jlt4qqreh9qq732g.apps.googleusercontent.com&quot;
   data-context=&quot;signin&quot;
   data-ux_mode=&quot;redirect&quot;
   data-auto_prompt=&quot;false&quot;
   data-login_uri =&quot;http://localhost:8080/chat/Googledata.jsp&quot;&gt;
  &lt;/div&gt;
  
  &lt;div class=&quot;g_id_signin&quot;
   data-type=&quot;standard&quot;
   data-shape=&quot;pill&quot;
   data-theme=&quot;outline&quot;
   data-text=&quot;signin_with&quot;
   data-size=&quot;medium&quot;
   data-logo_alignment=&quot;left&quot;&gt;
  &lt;/div&gt;
  </code></pre>
  <p>i have to modify my app so that anyone can access my app with an IP address or hostname when connected to the same network, yes my app works fine if it is accessed in that way, but the google sign in button is not working, as the data will only be sent to the localhost or loopback address, but I can't specify the IP address in the google console control panel.
  I have tried various methods, and third-party support like ngrok, nip.io, etc. but it is not the solution, then i finally found me the exact requirement i want..</p>
  <blockquote>
  <p>The app has to be unhosted, i.e, within the local network.
  The app has to work within the local network if the app is unhosted and portable.
  No third party can be used.
  Google implies certain conditions for reply URLs and the requirement is to support hostname and dynamic IPs so that google can support google auth in the unhosted app and find a concept to bridge these conditions.
  &quot;try to understand the ngrok networking and apply it here to have your solution&quot;</p>
  </blockquote>
  <p>and I have studied and researched some networking concepts and tried to create a reverse SSH tunnel between google and the app and it didn't work.
  Finally, I came to know i have set a a reverse proxy server between my app and google.
  the exact words are
  &quot;develop a solution to proxy the google response to your app
  Google -&gt; Proxy server -&gt; App&quot;
  I completely studied the proxy concepts, theoretically but I don't know how to implement this, for my problem statement.
  how can i work on it?<a href="https://i.stack.imgur.com/jb8H4.png" rel="nofollow noreferrer">The google console api</a></p>