Hello, We have an issue with a self hosted hydra ...
# ory-selfhosting
d
Hello, We have an issue with a self hosted hydra instance that we setup using the latest version of : https://github.com/ory/k8s/tree/master/helm/charts/hydra during the login accept flow : Hydra->>LoginUI: oAuth2LoginRequest alt accept login LoginUI->>Hydra: PUT /admin/oauth2/auth/requests/login/accept else reject login LoginUI->>Hydra: PUT /admin/oauth2/auth/requests/login/reject end We keep getting a 404 when the hydra instance is invoked with the latest version of hydra-go-sdk https://github.com/ory/hydra-client-go Looking at the logs we see this error :
Copy code
time=2025-12-12T06:27:11Z level=info msg=An error occurred while handling a request audience=application error=map[debug: message:Not Found reason: stack_trace:                                                                                                                                                      │
│ <http://github.com/ory/hydra/v2/flow.decodeFlow|github.com/ory/hydra/v2/flow.decodeFlow>                                                                                                                                                                                                                                                                               │
│     /project/flow/flow_encoding.go:32                                                                                                                                                                                                                                                                                 │
│ <http://github.com/ory/hydra/v2/flow.DecodeFromLoginChallenge|github.com/ory/hydra/v2/flow.DecodeFromLoginChallenge>                                                                                                                                                                                                                                                                 │
│     /project/flow/flow_encoding.go:46                                                                                                                                                                                                                                                                                 │
│ <http://github.com/ory/hydra/v2/consent.(*Handler).acceptOAuth2LoginRequest|github.com/ory/hydra/v2/consent.(*Handler).acceptOAuth2LoginRequest>                                                                                                                                                                                                                                                   │
│     /project/consent/handler.go:440                                                                                                                                                                                                                                                                                   │
The error happens at : https://github.com/ory/hydra/blob/master/flow/flow_encoding.go#L32 This in essence suggests we need to set the NetworkID somewhere which is not happening. How can we overcome this challange, we are using the latest versions of the helm chart (0.60.0) and github.com/ory/hydra-client-go/v25 v25.4.0 for the sdk?
m
Hello @delightful-fall-65294 It looks like a bit more complex issue so I can't immediately give you a solution here - at least the docs also don't mention this. Some things to double-check that might help • Correct admin base URL Make sure the SDK for acceptOAuth2LoginRequest is pointed at the admin endpoint (default :4445), not the public one (:4444). The docs explicitly separate public and admin ports. • Unmodified login_challenge Ensure you are passing exactly the login_challenge that Hydra appended to your login URL, without URL‑decoding/encoding issues or using the login_verifier by mistake. The API requires login_challenge as a query parameter on both getOAuth2LoginRequest and acceptOAuth2LoginRequest. [*getOAuth2LoginRequest*; acceptOAuth2LoginRequest] • Hydra configuration basics Confirm you started Hydra with: • A stable SECRETS_SYSTEM • A persistent DSN • Correct URLS_SELF_ISSUER, URLS_LOGIN, URLS_CONSENT since these are required for proper flow handling. Otherwise it might be an edge case or bug, and best course of action is to open an issue in ory/hydra with a reproducible test case.
d
I just went through your check list and everything seems to be checking out just fine.