From 294be265002323b388fdf3e994a0d3a5d5f0c6eb Mon Sep 17 00:00:00 2001 From: jhodgkin Date: Sun, 12 Jul 2026 22:27:39 -0600 Subject: [PATCH] fix: OIDC callback sent wrong scheme in token exchange redirect_uri Fastify only sees plain HTTP -- TLS terminates at NPM/Cloudflare before reaching this process. Building the callback's currentUrl from req.headers.host with a hardcoded "http://" sent redirect_uri=http://monitor.jerodrigged.com/... during the token exchange, which Authentik rejects (logged as generic "invalid_client" to the client, but its own event log said plainly: "Invalid redirect URI used by provider"). Fixed by reusing the known-correct redirectUri's origin and only taking the query string from the actual request, instead of trying to infer scheme from headers. Also fixes the Playwright OIDC test's selectors (Authentik's password field has no