Workaround for WebAuthenticator crash affecting Android on .NET MAUI

Eric L 20 Reputation points
2025-04-29T04:29:13.4766667+00:00

When using WebAuthenticator for .NET MAUI and the browser first launches, the app crashes in the background. When the app is relaunched, the browser can be opened again and the WebAuthenticator process succeeds without a problem. This affects Android and is the same issue posted here - https://github.com/dotnet/maui/issues/24692. There is a workaround suggested there which involves overriding the StartActivityForResult function in the WebAuthenticatorCallbackActivity subclass, but this did not work for me. Do you have another workaround for this issue that I could implement, or a more detailed version of the suggested workaround?

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 1,295 Reputation points Microsoft External Staff
    2025-08-27T10:57:49.78+00:00

    Hello,

    According to this Github issue [Android] Pass the launched extra when resuming WebAuthenticator #30583, this problem should be fixed so you don't need to find another workaround anymore.

    Make sure you are using the latest version of .NET MAUI and that your project is properly configured.

    If you are still experiencing issues, please create a Github issue on the official .NET MAUI repository.

    I hope this helps clarify the situation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.