-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebAuthenticator OpenId Connect Support #195
Comments
Thank you for your fast reply! To start I used the SLN from eShop: (I downloaded the entire repository to my machine) Then I found the usage of WebAuthenticator here: And updated it to thus:
And then the App.xaml.cs: To this:
I also had to add the protocol registration ( You do have to have Docker for Windows installed. After this, it's a matter of:
For reference, here is the callback URL that is returned from the OpenID Connect:
I know this is a bit involved, but it's what I have been using for the afternoon as I explore this. I have zero Maui/WinUI experience so this is it at the moment. That stated, please let me know if there is any further information that I can provide to assist. |
When it does the redirect in the browser to maui://, do you not see browser asking you to open the link in the eShop app? If not that means the registration for the app in the appx manifest isn't set up right. WinUIEx would never even get to be active if the redirect back to the app doesn't work. |
ok in that case it's the |
That's it. Thank you. I can confirm that the
But then when it gets into the application, it is different:
I'll dig further to see if I can figure this out. Thank you for your guidance. 🙏 |
Thanks for confirming |
and thanks for the donation too 💯 |
Hello @Mike-E-angelo and @dotMorten, I have recently started developing with .NET MAUI and I encountered this issue too. I wanted to detail a bit on what my solution was and if this is something that needs to be addressed for other users. How did I encounter this issue? On a brand new project I added the Investigation I found that OidcClient will make a call to the identity provider before the authentication process starts in ** Solution **
mentioned here. This setting is not available below Business Edition in my case, but you can check if this is the reason for what you are experiencing with your provider as well. ** Open Questions ** With OidcClient at the moment this feature is not working, as the |
Ahhh that's probably it @theorska thank you for that insight. I did indeed spend some additional time looking into it, and my estimation was exactly as you stated, that there was some state being persisted somewhere and referenced by a key that is later loaded on the return. In this case, I was doing the work for the client and there was only so much time we had to track this down. So I wasn't able to complete this task on time. We may revisit it in the future however and I will look further into this. 👍 (I was also going to update this thread on any further findings as well if I was successful) |
Thanks @theorska I'll make sure the new OAuth APIs in Windows App SDK 1.7 knows about this issue too, as they also rely on the state parameter (their implementation is near-identical to WinUIEx' in many ways) |
Thank you very much for making this extension. 🙏 I have been investigating Maui + Blazor Hybrid functionality and am currently exploring authentication, which led me to the disappointing discovery that
WebAuthenticator
is not available for Windows. 💥I also found the newest eShop which makes use of the
WebAuthenticator
and have tried to use WinUIEx's there instead.It appears the eShop solution uses OpenId Connect, and WinUIEx supports Oauth2, which makes it not work as expected. Essentially, another window opens and leaves the original opening window open without a response.
I took a peek at the resulting callback URL and the properties there are not what WinUIEx is expecting, which I believe is resulting in this condition.
Please let me know if I have something fundamentally misunderstood. Thank you for your consideration.
The text was updated successfully, but these errors were encountered: