Self-Hosted: SSO broken when using Authentik

(#597) Bug Fixed self-hosting

Thread

Comment by @nadd3r
RexSystem 1 vote originally by @nadd3r on GitHub OP
I'll include the logs from my Authentik server just in case they are helpful.
1781719900437	2026-06-17T18:11:40.437Z	{"auth_via": "oauth_token", "domain_url": "auth.example.com", "event": "/application/o/userinfo/", "host": "auth.example.com", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 162, "remote": "172.16.3.15", "request_id": "6b4a66ebfdb04844a1d280f7dd74bac3", "runtime": 71, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2026-06-17T18:11:40.436796", "user": "", "user_agent": "fluxer-api"}

1781719900279	2026-06-17T18:11:40.279Z	{"auth_via": "unauthenticated", "domain_url": "auth.example.com", "event": "/application/o/fluxer/jwks/", "host": "auth.example.com", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 162, "remote": "172.16.3.15", "request_id": "f580c74147464bc8a18a8dd8b98e5d42", "runtime": 318, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2026-06-17T18:11:40.279137", "user": "", "user_agent": "fluxer-api"}

1781719899868	2026-06-17T18:11:39.868Z	{"auth_via": "oauth_client_secret", "domain_url": "auth.example.com", "event": "/application/o/token/", "host": "auth.example.com", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 162, "remote": "172.16.3.15", "request_id": "e6f92a40b66a4b41a075abd1ab0a3feb", "runtime": 382, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2026-06-17T18:11:39.867812", "user": "", "user_agent": "fluxer-api"}

1781719898741	2026-06-17T18:11:38.741Z	{"auth_via": "session", "domain_url": "auth.example.com", "event": "/application/o/authorize/?response_type=code&client_id=OAUTH_CLIENT_ID&redirect_uri=https%3A%2F%2Fchat.example.com%2Fauth%2Fsso%2Fcallback&scope=openid+email+profile&state=ff4a07eeac962375c6cee705704a6a92&code_challenge=tx8bjP80VsyNGTpbpIVBgll3lHxklniDDgO3wgil2OM&code_challenge_method=S256&nonce=VYLhdWEJBKBr5pyZ18jn7A", "host": "auth.example.com", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 162, "remote": "192.168.2.146", "request_id": "94bced33057b4df792e198548ef671d6", "runtime": 301, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2026-06-17T18:11:38.740851", "user": "fluxer-user", "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0"}

1781719898659	2026-06-17T18:11:38.659Z	{"auth_via": "session", "domain_url": "auth.example.com", "event": "Task enqueued", "host": "auth.example.com", "level": "info", "logger": "authentik.tasks.middleware", "pid": 162, "request_id": "94bced33057b4df792e198548ef671d6", "schema_name": "public", "task_id": "76b2e739-4954-4ea1-bba5-98e9fae20c1b", "task_name": "authentik.events.tasks.event_trigger_dispatch", "timestamp": "2026-06-17T18:11:38.659116"}

1781719898613	2026-06-17T18:11:38.613Z	{"action": "authorize_application", "auth_via": "session", "client_ip": "192.168.2.146", "context": {"authorized_application": {"app": "authentik_core", "model_name": "application", "name": "Fluxer", "pk": "9d77b13bb2d34922a5d51e7d7f0744af"}, "flow": "5c5db42f14f14354a6625bc74aee276a", "http_request": {"args": {"client_id": "OAUTH_CLIENT_ID", "code_challenge": "tx8bjP80VsyNGTpbpIVBgll3lHxklniDDgO3wgil2OM", "code_challenge_method": "S256", "nonce": "VYLhdWEJBKBr5pyZ18jn7A", "redirect_uri": "https://chat.example.com/auth/sso/callback", "response_type": "code", "scope": "openid email profile", "state": "ff4a07eeac962375c6cee705704a6a92"}, "method": "GET", "path": "/application/o/authorize/", "request_id": "94bced33057b4df792e198548ef671d6", "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0"}, "scopes": "email profile openid"}, "domain_url": "auth.example.com", "event": "Created Event", "host": "auth.example.com", "level": "info", "logger": "authentik.events.models", "pid": 162, "request_id": "94bced33057b4df792e198548ef671d6", "schema_name": "public", "timestamp": "2026-06-17T18:11:38.613462", "user": {"email": "user@example.com", "pk": 6, "username": "fluxer-user"}}

1781719886687	2026-06-17T18:11:26.687Z	{"auth_via": "oauth_token", "domain_url": "auth.example.com", "event": "/application/o/userinfo/", "host": "auth.example.com", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 160, "remote": "172.16.3.1", "request_id": "1616f43069f6434b9f3d731cd71403a3", "runtime": 86, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2026-06-17T18:11:26.687531", "user": "", "user_agent": "Go-http-client/1.1"}
I do notice the unauthenticated for the path `/application/o/fluxer/jwks/ so that may be the culprit here but I am not sure.