You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tryed to implement that in an Uno app to try it out, but beneath the fact that we do not get a non-device https:// callback then only an ms-app:// callback or similar protocol prefixed, I did fail on the Activation Arguments 🤔 not sure if we even do have the same on the non-windows targets?
and for the linked sample of @xperiandri there, I did clone it locally and run into problems with the 6.x version of uno sdk packages especially for ios and as soon as I imported the SystemHttpIntegration package I think it was named, from the openIdDict there, we do have the problem of uno extensions is downgrading the google / xamarin activity packages so its all getting red / undetected and horribly not working at all.
not sure how that should then work in Uno if not even WinUI3 is fully supported at this point?
maybe this would require a Asp Net core Server app also which would then catch the redirect_uri callback as THIS has oAuth support... all other are problematic with the systemIntegration package from my understanding
@jeromelaban linked one of the OpenIdDict Maintainers to this, hope this is okay with you?
Maybe there is a chance that they have more info and can fix the problems with the SystemIntegration package.
but remark that I did not change the code of him which looks to me like its "just" using oidc but would not allow e.g. Authorization Code flow from oAuth2 without discovery endpoint and so on and would require a code challange.
Below that you can find what I came up with for WebAuthentication of uno, which is failing with
Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll
latest code also provided on the equivalent Uno.Extensions Repo feature request for oAuth support:
not sure if the WinUIEx_WebAuthenticator.cs code in the Uno Extensions could be enhanced too, as it seems to be used for oAuth but does still use id_token which would essentially not exist reading the oAuth standard documents.
I added a PR on the extensions Repo also, to match the token Identifyer names to the official standard documents for oAuth and jwt (which seems to be the one which has that id_token instead of OAuth) and added more flexibility on the Options for the TokenCache, so we have Clean Seperation of Concerns (Web Auth Callback Functions should not suddenly care about options like token Cache belogingins) and a FluentBuilder for those in the WebAuthenticationBuilderExtensions:
@DevTKSS So did you succeed with the OpenIddict implementation?
The main issue I had with Navigation Extensions is that they immediately activate the Window.
Hence, contrary to WinUIEx_WebAuthenticator the second instance of the app appears too and closes with some delay.
Kevin Chalet uses named pipes on Windows to unify the code. He told me that WinAppSDK does the same under the hood.
And OpenIddict has a piece of code on startup which calls .Result on Task which causes a WASM app crash. That piece can be replaced with a custom implementation...
@xperiandri No, I was not successful with it so far. He told me that https would not be possible without a server that does allow device protocol which is, why I am now again trying to set up the server project "WebApi" in my repo with their docs code, but that would again just be another workaround 😟.
I copied your code to a library project but its failing on the SystemHttpIntegration package because Uno does downgrade the Xamarin.Activity package as transient dependency for the ios and android target 🙄
I would need to habe the AuthorizationCodeFlow woth pkce and token refresh enabled which I tryed to do on the server project already, but left the client uno app on the top of app.xaml.cs unchanged from your sample
You can see my current status of that on the OpenIdDict-Integration Branch of my repo.
Same time I remembered the WebView2 Control Support in Uno, but while the Windows version of it does indeed support "Basic authentication navigation" thats not eben mentioned as supported or not supported on the uno implemented views... The only thing I am trying to do is to send my user to that https auth Endpoint and let them redirect the user to the https://localhost:5001/etsy-auth-callback but as the oidc host builder part is above the uno ConfigBuilder loading of IOptions I seem to not able to get the options like always through this from appsettings or user-secrets?
The WebAuthenticationProvider of uno does still not have an implementation for desktop wich would be the way Microsoft os telling to do besode the UriLauncher or WebView2 approach. Nothing seems to work even as workaround 😅 but windows throws me errors as soon as I use central loaded DataTemplates via ResourcesDictionary in app.xaml...
If you get OpenIddict Core server from sandbox as a project to a separate solution and replace project references with NuGets it should work.
Also there is a samples OpenIddict repo, but I’m not sure how current they are.
@xperiandri I did replace the projectreferences with nugets right from the start..
I think the main problem with using OpenIdDict in Uno as soon as you try to include Mobile targets in your app, is that downgrading of the Packages because uno references lower versions (why is that even? Why can't they upgrade them just like all the others?)
. I did found samples but only not usable in uno options:
WebAuthenticationBroker -> not implemented on uno for desktop target, which is my main goal
What could work, but failing on non UI allowance of IWebAuthenticationBrokerProvider via DI until now (added a PR on the extensions repo for this which is looking for review)
Bear in mind that auth on the desktop target may work only on Windows. Because in order to work on macOS the target must be -macos. And -desktop is just a plain .NET. And there are no crypto API in the plain .NET that can be used on macOS
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
This issue was closed because it had no activity for 10 days after being marked as stale. If you believe this is still relevant, feel free to reopen it or open a new issue with updated context.
Activity
ShreyasPathe commentedon Aug 5, 2025
Hi, would love to work on this issue. Could you please assign it to me?
DevTKSS commentedon Aug 11, 2025
a working reference for the oAuthManager from WinAppSdk for WinUI3 app with the openIdDict used alongside:
https://github.com/IlGalvo/WinUI3-OAuth2Manager-Sample/blob/main/Client/Client/MainWindow.xaml.cs
I tryed to implement that in an Uno app to try it out, but beneath the fact that we do not get a non-device
https://callback then only anms-app://callback or similar protocol prefixed, I did fail on the Activation Arguments 🤔 not sure if we even do have the same on the non-windows targets?and for the linked sample of @xperiandri there, I did clone it locally and run into problems with the 6.x version of uno sdk packages especially for ios and as soon as I imported the SystemHttpIntegration package I think it was named, from the openIdDict there, we do have the problem of uno extensions is downgrading the google / xamarin activity packages so its all getting red / undetected and horribly not working at all.
please see this Operating system integration notice of them for recognizing the limitations of exactly that package, as its known from them to not work on UWP which is to some point still kind of the uno base layer:
https://documentation.openiddict.com/integrations/operating-systems
https://documentation.openiddict.com/integrations/operating-systems#windows
(marked the WinUI3 support column)
not sure how that should then work in Uno if not even WinUI3 is fully supported at this point?
maybe this would require a Asp Net core Server app also which would then catch the redirect_uri callback as THIS has oAuth support... all other are problematic with the systemIntegration package from my understanding
DevTKSS commentedon Aug 17, 2025
@jeromelaban linked one of the OpenIdDict Maintainers to this, hope this is okay with you?
Maybe there is a chance that they have more info and can fix the problems with the SystemIntegration package.
I created a current Uno Sdk using Branch with the setup of @xperiandri his sample code applyed:
https://github.com/DevTKSS/DevTKSS.MyManufacturerERP/blob/openIdDict-Integration/src/DevTKSS.MyManufacturerERP/App.xaml.cs
but remark that I did not change the code of him which looks to me like its "just" using oidc but would not allow e.g. Authorization Code flow from oAuth2 without discovery endpoint and so on and would require a code challange.
Below that you can find what I came up with for WebAuthentication of uno, which is failing with
latest code also provided on the equivalent Uno.Extensions Repo feature request for oAuth support:
not sure if the WinUIEx_WebAuthenticator.cs code in the Uno Extensions could be enhanced too, as it seems to be used for oAuth but does still use
id_tokenwhich would essentially not exist reading the oAuth standard documents.I added a PR on the extensions Repo also, to match the token Identifyer names to the official standard documents for oAuth and jwt (which seems to be the one which has that
id_tokeninstead of OAuth) and added more flexibility on the Options for the TokenCache, so we have Clean Seperation of Concerns (Web Auth Callback Functions should not suddenly care about options like token Cache belogingins) and a FluentBuilder for those in the WebAuthenticationBuilderExtensions:xperiandri commentedon Aug 18, 2025
@DevTKSS So did you succeed with the OpenIddict implementation?
The main issue I had with Navigation Extensions is that they immediately activate the Window.
Hence, contrary to
WinUIEx_WebAuthenticatorthe second instance of the app appears too and closes with some delay.Kevin Chalet uses named pipes on Windows to unify the code. He told me that WinAppSDK does the same under the hood.
And OpenIddict has a piece of code on startup which calls
.ResultonTaskwhich causes a WASM app crash. That piece can be replaced with a custom implementation...DevTKSS commentedon Aug 18, 2025
@xperiandri No, I was not successful with it so far. He told me that https would not be possible without a server that does allow device protocol which is, why I am now again trying to set up the server project "WebApi" in my repo with their docs code, but that would again just be another workaround 😟.
I copied your code to a library project but its failing on the SystemHttpIntegration package because Uno does downgrade the Xamarin.Activity package as transient dependency for the ios and android target 🙄
I would need to habe the AuthorizationCodeFlow woth pkce and token refresh enabled which I tryed to do on the server project already, but left the client uno app on the top of app.xaml.cs unchanged from your sample
You can see my current status of that on the OpenIdDict-Integration Branch of my repo.
Same time I remembered the WebView2 Control Support in Uno, but while the Windows version of it does indeed support "Basic authentication navigation" thats not eben mentioned as supported or not supported on the uno implemented views... The only thing I am trying to do is to send my user to that https auth Endpoint and let them redirect the user to the
https://localhost:5001/etsy-auth-callbackbut as the oidc host builder part is above the uno ConfigBuilder loading of IOptions I seem to not able to get the options like always through this from appsettings or user-secrets?The WebAuthenticationProvider of uno does still not have an implementation for desktop wich would be the way Microsoft os telling to do besode the UriLauncher or WebView2 approach. Nothing seems to work even as workaround 😅 but windows throws me errors as soon as I use central loaded DataTemplates via ResourcesDictionary in app.xaml...
xperiandri commentedon Aug 18, 2025
If you get OpenIddict Core server from sandbox as a project to a separate solution and replace project references with NuGets it should work.
Also there is a samples OpenIddict repo, but I’m not sure how current they are.
DevTKSS commentedon Aug 19, 2025
@xperiandri I did replace the projectreferences with nugets right from the start..
I think the main problem with using OpenIdDict in Uno as soon as you try to include Mobile targets in your app, is that downgrading of the Packages because uno references lower versions (why is that even? Why can't they upgrade them just like all the others?)
. I did found samples but only not usable in uno options:
What could work, but failing on non UI allowance of IWebAuthenticationBrokerProvider via DI until now (added a PR on the extensions repo for this which is looking for review)
feat(WebAuthenticationProvider): Allow providing IWebAuthenticationBrokerProvider via DI parameters uno.extensions#2890
Using HttpListener like that
not sure if that console app sample from openIdDict might be apply able on uno desktop...
but only if I disable the webauthentication extension from uno...
xperiandri commentedon Aug 19, 2025
@DevTKSS add
and failure go away
xperiandri commentedon Aug 19, 2025
Bear in mind that auth on the
desktoptarget may work only on Windows. Because in order to work on macOS the target must be-macos. And-desktopis just a plain .NET. And there are no crypto API in the plain .NET that can be used on macOSDevTKSS commentedon Aug 20, 2025
@xperiandri my primary target would just be Desktop => Windows 11, but without the WinAppSdk, because of this persisting issue:
which I already face on my other Repo - [DataTemplates][ResourcesDictionary][WinAppSdk] Property Not Found Exception at
Styles/GalleryTemplates.xaml-x:DataTypeDevTKSS/DevTKSS.Uno.SampleApps#15but that seems to be coming from their side, not from uno themselfs.
github-actions commentedon May 12, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
xperiandri commentedon May 16, 2026
@ShreyasPathe do you know how to setup CI that will apply Apple certificate necessary for Mac Catalyst app to access the KeyChain?
github-actions commentedon Oct 25, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
github-actions commentedon Nov 5, 2026
This issue was closed because it had no activity for 10 days after being marked as stale. If you believe this is still relevant, feel free to reopen it or open a new issue with updated context.