MSAL WithUnoHelpers() is a no-op on WebAssembly in 7.0 (worked in 6.x)
Current behavior
On 7.0 (master), PublicClientApplicationBuilder.WithUnoHelpers() and AcquireTokenInteractiveParameterBuilder.WithUnoHelpers() from Uno.WinUI.MSAL do nothing on WebAssembly. Interactive sign-in needs a web UI and an HttpClient factory that the app now has to supply itself.
In 6.x, Skia WebAssembly apps got the WASM flavor of Uno.UI.MSAL: RuntimeAssetsSelectorTask keeps Uno.UI.MSAL with the WinRT layer on purpose (#20601). That flavor wired:
WithHttpClientFactory(WasmHttpFactory.Instance)on the application builder- a browser-based interactive web UI (
ts/MSAL.WebUI.ts)
c3608f48c4c ("Delete native WASM-DOM project heads", 2026-06-22) removed Uno.UI.MSAL.Wasm.csproj, so those branches stopped compiling into anything. #24554 then removes the dead code and documents the no-op.
Expected behavior
WithUnoHelpers() configures MSAL on WebAssembly as it did in 6.x, or the docs say plainly that WebAssembly apps need their own WithCustomWebUi(...) / WithHttpClientFactory(...) (#24554 adds that note).
How to reproduce it (as minimally and precisely as possible)
- Create an app with the
MSALUno feature and anet10.0-browserwasmhead on 7.0. - Build a
PublicClientApplicationwith.WithUnoHelpers()and callAcquireTokenInteractive(...).WithUnoHelpers().ExecuteAsync(). - Compare with the same app on 6.7.
This was found by reading the code; nobody has run it yet.
Workaround ️
Provide WithCustomWebUi(...) (and WithHttpClientFactory(...) if needed) yourself on WebAssembly.
Renderer
- Skia
- Native
Affected platforms ️
WebAssembly
Uno.Sdk version (and other relevant versions)
7.0 (master). Works in 6.7.
IDE version
No response
Anything else we need to know?
Things to investigate:
Uno.UI.MSALis now a single build. Can the WASM helpers come back behindOperatingSystem.IsBrowser(), usingJSImportinstead of the removed TS bindings and flavor?- Is the old
WasmHttpFactorystill needed with current MSAL.NET and the .NET browserHttpClienthandler? - Does the removed
MSAL.WebUI.tspopup flow still fit current MSAL.NET, or is a redirect flow better?
Follow-up from https://github.com/unoplatform/uno/pull/24554#discussion_r4132814483.
Source: unoplatform/uno