Repository navigation
fix(web): name every callback source when a flow cannot start - #3167
Merged
kazo0 merged 1 commit intoAug 26, 2026
Merged
Conversation
When neither configuration nor the start URI nor the platform broker yields
a callback URI, sign-in and sign-out cannot start. The warning named only
the first two sources:
LoginCallbackUri not specified and redirect_uri not set in LoginStartUri
which reads as a configuration slip even when the start URI does carry
{RedirectUri} and the real cause is a platform with no callback to derive.
The broker's own failure message was logged at Debug - invisible at the
level an app actually runs with - so the one line explaining the dead end
never appeared.
Found the hard way on an iOS head whose Info.plist declared
CFBundleURLSchemes at the root instead of inside CFBundleURLTypes, so iOS
ignored the scheme entirely. The app reported "redirect_uri not set", which
is the one thing that was not wrong.
GetBrokerCallbackUri becomes TryGetBrokerCallbackUri, returning the broker's
message alongside the (null) URI rather than logging it at Debug and
dropping it. The caller folds it into a single Warning that names all three
sources tried and says what makes a broker-derived callback possible - a
custom scheme registered for the app, CFBundleURLTypes/CFBundleURLSchemes in
Info.plist on iOS and Mac Catalyst, an intent filter on Android. The reason
travels to the caller rather than being logged at the source because that is
the last source tried: reported there, it is visible at Warning level, where
the flow being over makes it worth saying.
Both the login and logout paths take the same treatment.
Guarded by Given_WebAuthentication.When_BrokerCannotDeriveCallback_Then_
WarningNamesBroker, with StubWebAuthenticationBroker gaining a
CallbackUriError that makes GetCurrentApplicationCallbackUri throw the way a
real broker does on a platform with no callback. The test asserts the flow
does not start, the broker UI never opens, and the warning carries both the
broker's name and its reason.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01RhtkcHHpbm6XiDagFY6VaS
|
Tick the box to add this pull request to the merge queue (same as
|
4 of 7 tasks
kazo0
added a commit
that referenced
this pull request
Aug 26, 2026
- Web and OIDC pages now say where tokens are stored (the host's default IKeyValueStorage, per platform) and that an unencrypted store is reported by a startup Warning, linking to the storage overview's table - OIDC on Skia Desktop: the provider does not derive the redirect URI by default there, so the bullet now names the two options - a fixed RedirectUri or AutoRedirectUriFromWebAuthenticationBroker() - fix the method name on the OIDC page and walkthrough (AutoRedirectUriFromAuthenticationBroker never existed) - Web platform matrix links the Android intent filter and the iOS CFBundleURLTypes setup, the malformed-plist cause behind #3167 - Skia Desktop: say how to pin the loopback port and name the DefaultCallbackPath / DefaultReturnUri knobs the broker honors - upgrade notes: one bullet for the new unencrypted-store Warning Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BqwJ47NVrvRR9Ghjc4Ti7X
kazo0
added a commit
that referenced
this pull request
Sep 11, 2026
- Web and OIDC pages now say where tokens are stored (the host's default IKeyValueStorage, per platform) and that an unencrypted store is reported by a startup Warning, linking to the storage overview's table - OIDC on Skia Desktop: the provider does not derive the redirect URI by default there, so the bullet now names the two options - a fixed RedirectUri or AutoRedirectUriFromWebAuthenticationBroker() - fix the method name on the OIDC page and walkthrough (AutoRedirectUriFromAuthenticationBroker never existed) - Web platform matrix links the Android intent filter and the iOS CFBundleURLTypes setup, the malformed-plist cause behind #3167 - Skia Desktop: say how to pin the loopback port and name the DefaultCallbackPath / DefaultReturnUri knobs the broker honors - upgrade notes: one bullet for the new unencrypted-store Warning Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BqwJ47NVrvRR9Ghjc4Ti7X
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.
GitHub Issue (If applicable): closes #
Stacked on
dev/sb/auth-providers-fixes— this continues spec 014, which is not onmainyet.PR Type
What is the current behavior?
When neither configuration nor the start URI nor the platform broker yields a callback URI, sign-in and sign-out cannot start. The warning named only the first two sources:
That reads as a configuration slip even when the start URI does carry
{RedirectUri}and the real cause is a platform with no callback to derive. The broker's own failure message was logged atDebug— invisible at the level an app actually runs with — so the one line explaining the dead end never appeared.Found the hard way on an iOS head whose
Info.plistdeclaredCFBundleURLSchemesat the root instead of insideCFBundleURLTypes, so iOS ignored the custom scheme entirely. The app reported "redirect_uri not set", which is the one thing that was not wrong.What is the new behavior?
GetBrokerCallbackUribecomesTryGetBrokerCallbackUri, returning the broker's message alongside the (null) URI instead of logging it atDebugand dropping it. The caller folds it into a singleWarningthat names all three sources tried and says what makes a broker-derived callback possible:The reason travels back to the caller rather than being logged where it happens, because the broker is the last source tried: reported at the call site it is visible at
Warninglevel, where the flow being over makes it worth saying. Both the login and logout paths get the same treatment.Purely diagnostic — no change to which callback is chosen or how a flow runs.
specs/014-web-redirect-defaults/spec.mdgains a Diagnostics section recording the cause and the guard.Verification
StubWebAuthenticationBrokergains aCallbackUriErrorthat makesGetCurrentApplicationCallbackUrithrow the way a real broker does on a platform with no callback.When_BrokerCannotDeriveCallback_Then_WarningNamesBrokerasserts the flow does not start, the broker UI never opens, and the warning carries both the broker's name and its reason.Executed locally on the Skia desktop runtime-test head, not just compiled:
Given_WebAuthentication: 10 total, 10 passed, 0 failed — the 9 existing cases plus the new one.PR Checklist
Screenshots Compare Test Runresults.Notes on the checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01RhtkcHHpbm6XiDagFY6VaS