fix(oauth): always return newProps in tokenExchangeCallback + diagnostic log#197
Merged
Merged
Conversation
…allback
Remove the conditional that returned undefined for non-refresh_token grants
in `worker/src/oauth.ts#createOAuthProvider.tokenExchangeCallback`. Always
return `{ newProps }` so the library receives a grant-update signal for
every grantType. Replace the terse log line with an `[oauth-diag]` entry
that prints the JSON-stringified grantType and the keys of `ghProps` so
`wrangler tail` can reveal the real runtime grantType value.
refresh_token の runtime 値が library の typed union と一致せず条件分岐
が常に false で skip されていた疑いがあり、非 refresh 系の grant が
undefined 返却で library の grant-update signal を失って KV 側で grant
状態が消える一因になっていた可能性への対策。#187 で特定済みの KV grant
消失と #195 の callback/auth-loop 症状両方の上流で、診断 log で runtime
実値を捉えてから本 fix 判断する。
Refs #196 #195 #187
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-webhook-mcp | 4b0bd0d | Apr 20 2026, 03:36 AM |
This was referenced Apr 20, 2026
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.
Closes #196
Refs #195 #187
tokenExchangeCallback を常に
{ newProps }返却に変更し、runtime の grantType 実値を[oauth-diag]prefix で wrangler tail に捕捉可能にする。as nevercast + 条件分岐で runtime で skip されてる疑いが #187 KV grant 消失と #195 callback/auth-loop 症状の上流仮説。deploy 後に tail log で 1 回再現分の grantType 実値を見てから根本対処を判断する diagnostic patch。impact scope:
{ newProps }で互換維持