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?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,084 questions
0 comments No comments
{count} votes

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.