Library / SDK
vouch/vouch-proxy avatar
vouch/vouch-proxy

Vouch Proxy: SSO for many sites through Nginx auth_request and a shared parent-domain cookie

an SSO and OAuth / OIDC login solution for Nginx using the auth_request module

3,291 stars339 forksGoMIT

At a glance

What is it?
Vouch Proxy is a Go service that Nginx consults on every request to decide whether a visitor has logged in with an OAuth or OIDC provider. It protects several sites at once, but only if they share a cookie domain with the Vouch server.
Who is it for?
Vouch Proxy suits operators who already run Nginx and want one OAuth or OIDC login in front of several internal apps on the same parent domain, without adding login code to each app. It is the wrong tool when the protected apps live on unrelated domains, since the design depends on a shared cookie, or when you need tagged releases to pin, because the repository has none.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 59 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • vouch/vouch-proxy3,291 ★ · +10
Star history
Repository2026-09-242026-11-25
vouch/vouch-proxy3.3k3.3k

10 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Nginx asks Vouch about every request, and Vouch answers from a cookie

Vouch Proxy is an SSO solution for Nginx that uses the auth_request module. It forces visitors to log in with an identity provider before they can reach a website, and it can serve as single sign-on for all web applications in the same domain. After a visitor logs in, Vouch allows access to the protected sites for several hours, and every request is checked to ensure it is still valid.

If Vouch runs on the same host as the Nginx reverse proxy, the project says the response time from its validate endpoint to Nginx should be under 1 ms. That is the project's own figure for a same-host setup, and it matters because the check happens on every request. Vouch can also pass the visitor's email, name and other IdP data, including access tokens, to the application as HTTP headers, which can replace application user management entirely.

The design needs one cookie shared between Vouch and the apps

Vouch Proxy relies on sharing a cookie between the Vouch server and the application it protects. The usual layout runs Vouch on a subdomain such as vouch.yourdomain.com, with apps at app1.yourdomain.com and app2.yourdomain.com, so the protected domain is the common parent.

This is the main limit. Applications on unrelated domains cannot share the cookie, so one Vouch instance cannot protect both example.org and example.net. If your sites span several registered domains, you would need a Vouch deployment per domain. If you run everything under one parent domain, a single instance covers every subdomain, which is the situation the project is built for.

Configuration starts by copying a provider example file

You pick the example configuration for your provider and copy it into place:

code
cp ./config/config.yml_example_$OAUTH_PROVIDER ./config/config.yml

Then you create OAuth credentials for Vouch Proxy with your provider, for instance Google or GitHub, and point the callback URL at the Vouch Proxy auth endpoint. Then you configure Nginx. The Nginx example assumes Nginx, the Vouch host and the protected app run on one server and that both domains are served over HTTPS with valid certificates. If not, change the listener to port 80 and set the cookie secure setting to false.

The key lines send every request to the validate endpoint and forward that sub-request to Vouch on localhost:

nginx
    # send all requests to the `/validate` endpoint for authorization
    auth_request /validate;

    location = /validate {
      # forward the /validate request to Vouch Proxy
      proxy_pass http://127.0.0.1:9090/validate;
      # be sure to pass the original host header

Passing the original host header matters, because Vouch uses it to work out where to send the visitor back after login.

Many providers, but several are documented only in issues and pull requests

The supported list includes Google, GitHub, GitHub Enterprise, IndieAuth, Okta, Slack, ADFS, Azure AD, Alibaba iDaaS, AWS Cognito, Twitch, Discord, SecureAuth, Gitea, Keycloak, an OAuth2 server library for PHP, HomeAssistant, OpenStax, Ory Hydra, Nextcloud, Pocket ID and most other OIDC providers.

The links tell you how well each one is documented. Google, GitHub, GitHub Enterprise, Slack, Twitch, Discord, SecureAuth, Gitea, Keycloak and Pocket ID point to example configuration files in the repository. ADFS, Azure AD, Alibaba, Cognito, the PHP library and Ory Hydra point to pull requests or issues, so their instructions live in discussion threads and may be incomplete. If your provider is in the second group, expect to read the thread and adapt a generic OIDC configuration.

Docker, Kubernetes, source builds and environment variables are all covered

The table of contents shows the supported ways to run it: Docker, a Kubernetes Nginx Ingress, and compiling from source and running the binary. The repository includes a Dockerfile and an Alpine Dockerfile, a do.sh helper script and an examples directory with Nginx, OpenResty, Slack and startup examples. You can also configure Vouch through environment variables, not only the YAML file, which suits container deployments.

There is a section on running Vouch Proxy in a path and on advanced authorization using OpenResty, where you can decide access by user or group instead of just login state. The go.mod requires Go 1.27.1 to build, and dependencies include viper for configuration, golang-jwt, gorilla sessions, an OAuth2 library with a PKCE code verifier, and zap for logging.

An infinite redirect loop is the first failure the README warns about

The troubleshooting section is headed with a request to read it before submitting an issue, and its first entry is an infinite redirect loop that returns you to your identity provider, whether Google, Okta or GitHub. The second entry covers what to do when you have read the issues, tried some changes to your configuration and it still does not work.

The usual suspects in a loop are the pieces the design depends on: a cookie that is not shared between hosts, a secure cookie served over plain HTTP, or a host header that was not passed on. The README's own configuration notes cover the last two. Check the cookie domain and the secure flag first, then compare your Nginx config with the example.

No releases, MIT license, and a last push in late September 2026

The repository has no GitHub releases, so there is no tagged version to pin; the CHANGELOG.md file is the place to read what changed. The license is MIT, and the last push was on 2026-09-27. A SECURITY.md file is included, and the CI badge in the README points to Travis CI, which is worth knowing when you judge how current the automation is.

Please tell the maintainers when you deploy Vouch with a provider that is not on the list, because the README asks for that to keep the list current. If your app trusts the identity headers Vouch sends, make sure the app is reachable only through the protected path, otherwise a request that skips Nginx could supply those headers itself.

Editorial conclusion

Vouch Proxy suits operators who already run Nginx and want one OAuth or OIDC login in front of several internal apps on the same parent domain, without adding login code to each app. It is the wrong tool when the protected apps live on unrelated domains, since the design depends on a shared cookie, or when you need tagged releases to pin, because the repository has none. Check the redirect-loop troubleshooting notes before you open an issue.

Frequently asked questions

what is vouch proxy

Vouch Proxy is an SSO and OAuth or OIDC login solution for Nginx built on the auth_request module. It can protect all of your websites at once.

What is an OAuth proxy?

Vouch Proxy is one: it sits beside Nginx, forces visitors to log in with an identity provider such as Google or GitHub, and then lets Nginx allow access to the protected site.

How to add proxy authentication?

With Vouch Proxy, copy a provider example config to config.yml, create OAuth credentials with the callback pointing at the Vouch auth endpoint, and add auth_request /validate to your Nginx server block.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. vouch/vouch-proxy on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/vouch-vouch-proxy.svg)](https://hysenlabs.com/projects/vouch-vouch-proxy)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/vouch-vouch-proxy.svg)](https://hysenlabs.com/projects/vouch-vouch-proxy)

Was this useful?