-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Maui Essentials WebAuthenticator not working in WinUI #2702
Description
I'm attempting to use WebAuthenticator in Maui Essentials to authenticate a WinUI project, but it's having an issue finding the manifest file. It throws an exception saying:
Could not find file 'C:\WINDOWS\system32\AppxManifest.xml'.
If I add a local version of https://github.com/dotnet/maui/blob/main/src/Essentials/src/WebAuthenticator/WebAuthenticator.uwp.cs into my project (I made PlatformAuthenticateAsync public to test it and just passed the url and callbackUrl in the WebAuthenticatorOptions) and adjust line 51 to:
var doc = XDocument.Load($"{AppDomain.CurrentDomain.BaseDirectory}AppxManifest.xml", LoadOptions.None);It then finds the file, however, a new error is thrown that says:
System.Runtime.InteropServices.COMException: 'There are no remote procedure calls active on this thread. (0x800706BD)'
Additionally, I set the CallbackUrl to:
new Uri("io.identitymodel.native://callback")and the Url to:
new Uri("https://demo.identityserver.io")