Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a MAUI (WinUI-only) client sample #1657

Closed
wants to merge 1 commit into from

Conversation

kevinchalet
Copy link
Member

MAUI doesn't support the .NET Generic Host, so the new OpenIddict Windows integration cannot work natively without registering custom implementations of IHostEnvironment and IHostApplicationLifetime and using an IHostedService -> IMauiInitializeService adapter. This sample shows how to do that for MAUI on WinUI3.

Note: the custom implementation of IHostApplicationLifetime is very na茂ve as the host integration offered by MAUI is extremely limited. That said, it works, so... 馃槄

Hopefully a future MAUI version will improve things: dotnet/maui#2244.

@kevinchalet kevinchalet added this to the 4.1.0 milestone Jan 27, 2023
@kevinchalet kevinchalet self-assigned this Jan 27, 2023
@kevinchalet
Copy link
Member Author

The build fails because installing the maui-tizen workload is required... to build a WinUI3-only MAUI app.
Why can't we have nice things, Microsoft?...

@kevinchalet
Copy link
Member Author

Having to install the maui-tizen workload just for a sample is far from ideal so I won't merge this PR into the dev branch.

That said, if there's enough interest, I'll update the PR branch from time to time. If you're interested, let me know.

@kevinchalet
Copy link
Member Author

kevinchalet commented Feb 8, 2023

Branch updated: https://github.com/kevinchalet/openiddict-core/tree/maui_winui_sample

@kevinchalet
Copy link
Member Author

Sample updated to use OpenIddict.Client.SystemIntegration (that replaces OpenIddict.Client.Windows).

@kevinchalet
Copy link
Member Author

Branch updated to adopt the final version of OpenIddict.Client.SystemIntegration that was announced here: https://kevinchalet.com/2023/02/27/introducing-system-integration-support-for-the-openiddict-client/

@kevinchalet
Copy link
Member Author

Branch updated to target OpenIddict 5.0.1 and .NET 8.0/MAUI 8.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant