uno.extensions icon indicating copy to clipboard operation
uno.extensions copied to clipboard

Authentication Popup not closing for MSAL authentication extension

Open cosymon opened this issue 9 months ago • 0 comments

Current behavior

When LoginAsync is called using the Authentication service, the popup doesn't send the token back to the main window, but instead sends it to a new page inside the popup.

Image

Image

After looking in the logs I found this error: dbug: Uno.Extensions.Authentication.MSAL.MsalAuthenticationProvider[0] LoginAsync - Error attempting to login [Error - Popup closed]

Expected behavior

The token is sent back to the main window, and the popup closes

How to reproduce it (as minimally and precisely as possible)

Add MSAL authentication following this tutorial

Environment

Target Framework (s): net9.0-browserwasm

Nuget Package (s): Uno.Extensions.Authentication.MSAL.WinUI

Package Version(s): 5.2.7

Affected platform(s):

  • [ ] iOS
  • [ ] macOS (AppKit)
  • [ ] Mac Catalyst
  • [ ] Android
  • [x] WebAssembly
  • [ ] Windows
  • [ ] Skia (WPF)
  • [ ] Skia (GTK on Linux/macOS/Windows)
  • [ ] Skia (Linux Framebuffer)
  • [ ] Build tasks

Visual Studio:

  • [ ] 2019 (version: )
  • [x] 2022 (version: )
  • [ ] Visual Studio Code (version: )
  • [ ] Rider Windows (version: )
  • [ ] Rider macOS (version: )

Additional Information

During troubleshooting, I changed the target framework to net8.0-browserwasm, and it worked as intended

cosymon avatar Feb 12 '25 15:02 cosymon