Repository navigation
Log FW Lite sign-in lifecycle and make log levels configurable - #2730
Open
hahn-kev-bot wants to merge 1 commit into
Open
hahn-kev-bot wants to merge 1 commit into
hahn-kev-bot wants to merge 1 commit into
Conversation
A field report of "localhost refused to connect" after a browser login could not be diagnosed from app.log: MSAL's listener messages are filtered to Warning in code and our own code logged nothing about the sign in. Now: - AuthService logs sign-in start, success and failure with elapsed time. - OAuthService logs the loopback redirect URI (port) when it opens the browser, via a new AuthConfig.OpenSystemBrowser hook that MAUI fills with Launcher.Default.OpenAsync, and warns when the app stops with a sign in still waiting for the browser. - Log filters come from configuration instead of hard-coded AddFilter calls. Defaults are registered before environment variables, so a user can raise a category for one session, e.g. Logging__LogLevel__FwLiteShared.Auth.LoggerAdapter=Information. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
2 of 5 tasks
hahn-kev
added this pull request to stack #2737
October 7, 2026 07:03
This branch has not been deployed
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.
I've got some more changes coming to make this even easier for users to enable debug logging.
AI summary
Context: a user behind a VPN completed a browser login and Chrome landed on
localhost:53021with "refused to connect". MSAL's loopback listener lives only inside the FW Lite process and only until the first request, andapp.logcould not tell us what happened: MSAL's listener messages are filtered to Warning in code, and our own code logged nothing about the sign in.AuthService.SignInWebViewlogs start, success and failure with elapsed time and the server. Unclassified failures are logged at Error before being rethrown.OAuthServicelogs the loopback redirect URI (so the port) when it opens the browser, using a newAuthConfig.OpenSystemBrowserhook. MAUI fills it withLauncher.Default.OpenAsync, which replaces MSAL's ownProcess.Starton Windows only; Android and the Mac Catalyst custom web UI path never use it. It also warns when the app stops with a sign in still waiting for the browser, which is the "refused to connect" scenario.FwLiteMauiKernelreads log filters from configuration vialogging.AddConfigurationinstead of hard-codedAddFiltercalls. The former filters becomeFwLiteMauiKernel.DefaultConfiguration, registered inMauiProgrambefore environment variables, so a user can raise a category for one session:Logging__LogLevel__FwLiteShared.Auth.LoggerAdapter=Informationturns on MSAL's "Listening for authorization code on http://localhost:PORT/" and "HttpListener stopped" messages.A friendlier way to inject this configuration (a settings file or a UI toggle rather than env vars) is being designed separately.
Test plan
developdotnet test backend/FwLite/FwLiteShared.Tests --filter FullyQualifiedName~Authpassesapp.logshows the start line withredirect_uri=http://localhost:<port>and the success lineLogging__LogLevel__FwLiteShared.Auth.LoggerAdapter=Informationand confirm MSAL's listener messages appear🤖 Generated with Claude Code