Implementing a reverse proxy: how to specify Google OAuth2 parameters?

@crcastle wrote a useful and well-written description of how to use an Oath2 reverse proxy to password-protect a site hosted by Render. But the description seems to be missing one important detail: the parameters for the Google OAuth client ID. In particularly, what URI was specified for the Authorized Javascript origins, and what URI for the Authorized redirect URIs?

What is needed here?

Hi David,

Thanks for reaching out.

Those details would be the URIs of where OAuth2 Proxy is running and is noted in their docs (here’s the Google example): https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider/#google-auth-provider

For example, if you were only using the default onrender.com domains it would be something like:

  • Authorized JavaScript origins is your domain ex: https://your-service-slug.onrender.com
  • Authorized redirect URIs is the location of oauth2/callback ex: https://your-service-slug.onrender.com/oauth2/callback

If you use a custom domain, you could also add those to Google’s settings.

Hope that helps

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.