Add Authentication to .NET MAUI Apps with Auth0

Hello,

I’ve had the Auth0 utilities working well for some time now.
My app runs in iOS, Android and Windows.

I recently upgraded to target .Net 9.0 framework with all relevant nuget package updates too.

What I’m finding and REALLY struggling to solve is the Webview.Navigated or Webview.Navigating events / event handlers no longer trigger in the WebViewBrowserAuthenticator.cs

This is an issue running in Windows and the need to use a WebView, all seems ok on iOS and Android (for now).

This is NOT an Auth0 issue as this is reported in various webview usages, however, I’m sure this must have been encountered using the mechanisms here.

I was wondering if ANYONE had come across this issue and have found a way to trigger these events in a Maui app?

Thanks for any input!

This no longer triggers…

        _webView.Navigated += (sender, e) =>
        {
            if (e.Url.StartsWith(options.EndUrl))
            {
                if (tcs.Task.Status != TaskStatus.RanToCompletion)
                {
                    tcs.SetResult(new BrowserResult
                    {
                        ResultType = BrowserResultType.Success,
                        Response = e.Url.ToString()
                    });
                }
            }
        };