fix(oidc): raise the 3500ms HTTP timeout that was killing Google sign-in - #323
Merged
Conversation
The final link in the prod sign-in outage. With the security service pinned to 1
replica the PKCE state is now found correctly (callback logs 'hasCode: true,
hasState: true'), and the ONLY remaining failure is the code->token grant:
RPError: outgoing request timed out after 3500ms
at Client.grant (openid-client/lib/client.js:1370)
at OIDCService.handleCallback (oidc.js:109)
3500ms is openid-client's default, and it is below Authentik's real p99 — the IdP
averages ~1.3s per request with multi-second spikes, and the grant is several
round-trips. So Google auth completed, the callback arrived with a valid code and
state, and the exchange then timed out — surfacing to the user as the opaque
?error=authentication_failed.
Set the timeout via custom.setHttpOptionsDefaults so it covers discovery, the
token grant, userinfo AND jwks — not just the one call that happened to fail
first. Default 15000ms, overridable with OIDC_HTTP_TIMEOUT_MS so it can be tuned
per environment without a rebuild.
Note this is a code change, so it needs an image build; the release pipeline's
deploy-application job is currently skipped (gated behind a failing AWS Terraform
job), so the securityService image tag will need a manual bump in values-prod to
actually reach prod.
Refs #294
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session-Id: f636c22e-1cd7-401e-8843-97e3e3a4ba01
izzywdev
added a commit
that referenced
this pull request
Jul 20, 2026
release.yml built the image but deploy-application is skipped (gated behind the failing AWS Terraform job), so bump the tag here for Argo — same manual step the frontend needed in 6ec957c. This ships the openid-client timeout fix that was the last failure in the sign-in chain (code->token grant dying at the 3500ms default). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session-Id: f636c22e-1cd7-401e-8843-97e3e3a4ba01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The final link in the prod sign-in outage.
With the security service pinned to 1 replica (
f6faf4de), the PKCE state is now found correctly — the callback logshasCode: true, hasState: true. The only remaining failure is the code→token grant:3500ms is openid-client's default, and it is below Authentik's real p99. The IdP averages ~1.3s per request with multi-second spikes, and the grant is several round-trips. So Google auth completed, the callback arrived with a valid code and state, and the exchange timed out — surfacing to the user as the opaque
?error=authentication_failed.Fix
custom.setHttpOptionsDefaults({ timeout })so it covers discovery, the token grant, userinfo and jwks — not just the one call that happened to fail first. Default 15000ms, overridable viaOIDC_HTTP_TIMEOUT_MSso it can be tuned per environment without a rebuild.Deploy caveat (important)
This is a code change, so it needs an image build. The release pipeline's
deploy-applicationjob is currently skipped (gated behind a failing AWS Terraform job that reads a non-existent ELB/ASG), so merging alone will not ship it — thesecurityService.image.taginvalues-prod.yamlwill need a manual bump, exactly as the frontend did in6ec957ce.Refs #294
🤖 Generated with Claude Code