GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(shared): show the provider's reason when an OIDC token request fails by flvvius · Pull Request #1 · TuroYT/t3code

Conversation

@flvvius

@flvvius flvvius commented Nov 18, 2026

Copy link
Copy Markdown

Problem

While testing pingdotgg#34302 (pingdotgg/t3code) against Microsoft Entra ID, the first web sign-in ended on "The token request failed with 400." and nothing else. requestTokens keeps the provider's error only as oauthError, and the callback page shows neither that nor error_description. So a misconfigured app registration (for Entra, the redirect URI under the wrong platform type) looks exactly like a bug, and the only way to find out which is DevTools.

Change

A failed token request now puts the provider's error_description in the message, or its error code when there is no description: "The token request failed with 400: AADSTS…". When the body has neither, the message is the same as before. status and oauthError are unchanged, so isPermanentRefreshFailure behaves as before.

Scope

A small fix to this branch's OIDC client, from the findings in my test report on pingdotgg#34302. The CLI device flow already shows the provider's text, which is how the second misconfiguration in that test was diagnosed in one try.

Verification

  • Extended the existing "tells a rejected refresh apart from a temporary failure" case in packages/shared/src/oidc.test.ts. It fails on the branch head (2239610) and passes with the fix.
  • vp test run packages/shared/src/oidc.test.ts packages/client-runtime/src/relay/oidcController.test.ts: 36 passed.
  • check:changed against the branch head: format, lint, knip and typecheck (36 packages) pass. It also runs apps/server/src/provider/AgentContextBudget.test.ts, which fails to load on my machine with or without this change ("Vitest failed to find the current suite"), so that failure is unrelated.

Done with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@flvvius @claude
fix(shared): show the provider's reason when an OIDC token request fails
8894fc8
A rejected token request only reported the HTTP status ("The token request
failed with 400."), so a misconfigured app registration looked the same as a
bug. Include the provider's error_description, or its error code, in the
message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S labels Nov 18, 2026
@flvvius

flvvius commented Nov 19, 2026

Copy link
Copy Markdown
Author

Closing: b8787c3 on the PR branch already shows the provider's reason on token errors. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@flvvius flvvius closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@flvvius
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.