Describe the bug
After upgrading to 2026.8.0 (Rust proxy outpost), OAuth code redemption fails. The browser loops endlessly (ERR_TOO_MANY_REDIRECTS): auth/nginx → 401 → /outpost.goauthentik.io/start → /application/o/authorize/ → /callback → restart.
WARN failed to redeem callback; restarting auth flow
err: HTTP status client error (400 Bad Request) for url (https://auth.example.com/application/o/token/)
Location: src/outpost/proxy/backchannel.rs:86
nginx answers that POST with a bare 400 and an empty request line in the access log ("-" 400 157). With error_log ... info;, nginx names the cause:
[info] client sent duplicate host header: "host: auth.example.com", previous value: "host: auth.example.com" while reading client request headers, client: 10.89.0.209, server: auth.example.com, host: "auth.example.com"
So the Rust outpost sends the Host header twice on the token backchannel request. nginx (RFC 7230 — a server MUST respond 400 to a request with duplicate Host headers) rejects it before the request ever reaches authentik.
How to reproduce
- Proxy provider in forward-auth (nginx) mode,
AUTHENTIK_HOST=https://<public-host> (public URL reachable through nginx from the outpost container), 2026.8.0 on both sides.
- Open a protected app in a fresh browser session.
-
- Observe the redirect loop; nginx logs
client sent duplicate host header for the outpost's POST /application/o/token/.
Expected behavior
The outpost sends exactly one Host header on backchannel requests (here: src/outpost/proxy/backchannel.rs), so deployments where the outpost reaches the issuer through a strict reverse proxy keep working.###
Screenshots
No response
Additional context
Workaround: split backchannel from browser URL — AUTHENTIK_HOST=http://authentik:9000 (direct to server, no nginx in path) + AUTHENTIK_HOST_BROWSER=https://auth.example.com. Redemption then succeeds and the loop stops.
Browsers tolerate/de-duplicate duplicate Host headers, which is why the authorize flow works and only the backchannel POST fails — making this hard to diagnose from authentik logs alone.
Deployment Method
Docker
Version
2026.8.0
Relevant log output
# Outpost (proxy container), once per redirect-loop iteration:
WARN authentik::outpost::proxy::application::handlers handle_auth_callback:
failed to redeem callback; restarting auth flow
err: 0: HTTP status client error (400 Bad Request) for url (https://auth.example.com/application/o/token/)
Location: src/outpost/proxy/backchannel.rs:86
# nginx access log (note empty request line "-", bare 400):
10.89.0.209 - - [19/Aug/2026:10:46:10 +0000] "-" 400 157 "-" "-"
# nginx error log with error_log info; — the actual cause:
2026/08/19 10:46:10 [info] 17#17: *18 client sent duplicate host header:
"host: auth.example.com", previous value: "host: auth.example.com"
while reading client request headers, client: 10.89.0.209,
server: auth.example.com, host: "auth.example.com"
Describe the bug
After upgrading to 2026.8.0 (Rust proxy outpost), OAuth code redemption fails. The browser loops endlessly (ERR_TOO_MANY_REDIRECTS):
auth/nginx → 401 → /outpost.goauthentik.io/start → /application/o/authorize/ → /callback → restart.nginx answers that POST with a bare
400and an empty request line in the access log ("-" 400 157). Witherror_log ... info;, nginx names the cause:So the Rust outpost sends the
Hostheader twice on the token backchannel request. nginx (RFC 7230 — a server MUST respond 400 to a request with duplicate Host headers) rejects it before the request ever reaches authentik.How to reproduce
AUTHENTIK_HOST=https://<public-host>(public URL reachable through nginx from the outpost container), 2026.8.0 on both sides.client sent duplicate host headerfor the outpost'sPOST /application/o/token/.Expected behavior
The outpost sends exactly one
Hostheader on backchannel requests (here:src/outpost/proxy/backchannel.rs), so deployments where the outpost reaches the issuer through a strict reverse proxy keep working.###Screenshots
No response
Additional context
Workaround: split backchannel from browser URL —
AUTHENTIK_HOST=http://authentik:9000(direct to server, no nginx in path) +AUTHENTIK_HOST_BROWSER=https://auth.example.com. Redemption then succeeds and the loop stops.Browsers tolerate/de-duplicate duplicate Host headers, which is why the authorize flow works and only the backchannel POST fails — making this hard to diagnose from authentik logs alone.
Deployment Method
Docker
Version
2026.8.0
Relevant log output