Repository navigation
feat(samples): add the OIDC authentication extensions demo - #969
Merged
Merged
Conversation
…ktop Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
…e and keychain entitlement Verified on Android (API 36 emulator): sign-in through Chrome and the oidcdemo:// intent, the authenticated API call, and sign-out. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
…n-out confirmation page Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
…torage, adds the id_token_hint on any end-session URL, registers the API serializer context Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
…tensions 8.0.0-dev.135 loopback broker Uno.Extensions 8.0.0-dev.135 (uno.extensions#3261) makes AddOidc register a loopback WebAuthenticationBroker on Windows, macOS and Linux and sends id_token_hint on sign-out, so the sample's own SystemBrowser IBrowser goes away. The desktop head now only overrides the redirect URIs through configuration with http://localhost:52001/authentication-callback. No Uno.Sdk pins dev.135 yet: Directory.Build.props raises UnoExtensionsVersion, global.json moves to Uno.Sdk 7.0.0-dev.89 (dev.135 is built against its Uno.WinUI and Toolkit pins), and a Debug-only Uno.WinUI.Lottie reference keeps the Hot Design / App MCP tooling from failing at startup (uno.extensions#3262). A log filter at Information for Uno.Extensions.Authentication shows which broker handles the flow. README, in-app platform guide and troubleshooting describe the new behaviour; verified end to end on desktop (sign-in, API call, sign-out returning through the identity provider's link) and on WebAssembly (sign-out popup now offers the link back and the broker closes it). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
…ck override is required Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
Sign-in through ASWebAuthenticationSession, silent refresh after a restart, the API call and sign-out through the identity provider's link, on an iOS 18.5 simulator with Uno.Sdk 7.0.0-dev.89 and Uno.Extensions 8.0.0-dev.135. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV
3 of 10 tasks
… drops the Uno.Extensions override Uno.Sdk 7.0.0-dev.95 and later pin Uno.Extensions 8.0.0-dev.147+, which has the desktop loopback WebAuthenticationBroker (unoplatform/uno.extensions#3261), so Directory.Build.props no longer raises UnoExtensionsVersion. The Debug-only Uno.WinUI.Lottie reference stays: Uno.UI.App.Mcp.Client 2.0.0-dev.18 still references Uno.UI.Lottie and a Debug build without it fails at startup (unoplatform/uno.extensions#3262). Desktop sign-in, the API call and the silent sign-in after a restart were checked on macOS with the new versions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PZQ75jaJiiGCSEDPc39foS
kazo0
marked this pull request as ready for review
October 30, 2026 19:59
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
UI/Authentication.OidcExtensionsDemo, a single-project Uno app demonstrating Uno.Extensions OpenID Connect authentication (AddOidc) across Desktop (Skia), WebAssembly, Android and iOS. It is the OIDC counterpart ofUI/Authentication.MsalExtensionsDemo(#948): same three pages, same flow log, so the two providers can be compared side by side.What it demonstrates
IAuthenticationServicecall: the silent startup refresh, interactive sign-in with the redirect URI in use, the stored tokens with the ID token's claims decoded, sign-out, and everyLoggedOutevent.GET /api/teston the Duende demo server through a Refit client registered insideUseHttp, so the handler Uno.Extensions chains in adds the bearer token and refreshes on 401. Signed out, the same call answers 401.{origin}/authentication-callbackon WebAssembly, the intent-filter scheme on Android, theCFBundleURLTypesentry and keychain entitlement on iOS.Configuration
It runs as is:
appsettings.development.jsonpoints at the Duende demo server'sinteractive.publicclient (code flow with PKCE, no secret, any redirect URI accepted), sign in asalice/alice. The README covers pointing it at another identity provider, and the redirect schemeoidcdemois the one value that has to change in four places (appsettings, the Android activity,Info.plist,Package.appxmanifest).Two things the sample does that a template app does not, both explained in the README's Versions section:
RedirectUriandPostLogoutRedirectUrithrough configuration (an in-memory source over appsettings) withhttp://localhost:52001/authentication-callback, because OIDC code options replace the whole section rather than merging with it.App.xaml.csadds a log filter at Information forUno.Extensions.Authentication, so the console says whichWebAuthenticationBrokeris handling the flow.Packages
Uno.Sdk7.0.0-dev.1158.0.0-dev.150Desktop sign-in needs Uno.Extensions 8.0.0-dev.135 or later: the first version whose
AddOidcregisters a loopbackWebAuthenticationBrokeron Windows, macOS and Linux (unoplatform/uno.extensions#3261) and sends the cached ID token asid_token_hinton sign-out. Uno.Sdk 7.0.0-dev.95 and later pin it (dev.95 pins Uno.Extensions 8.0.0-dev.147), so the sample no longer overridesUnoExtensionsVersion.Temporary: the csproj references
Uno.WinUI.Lottiein Debug builds only. Even on Uno.Sdk 7.0.0-dev.115, the App MCP client that Debug builds carry (Uno.UI.App.Mcp.Client2.0.0-dev.18) referencesUno.UI.Lottie, which Uno.WinUI no longer ships, and a Debug build dies at startup without it (unoplatform/uno.extensions#3262). Release builds start without it. The reference can go once the tooling packages are rebuilt.Verification
All against the Duende demo server:
GET /api/test200, silent sign-in after a restart. Sign-out (returning through the identity provider's link and raisingLoggedOut) and the 20-claim check were last run on Uno.Sdk 7.0.0-dev.89 / Uno.Extensions 8.0.0-dev.135./authentication-callbackand closes; sign-out popup offers the link back and the broker closes it.oidcdemo://callbackintent back to the app, API 200, sign-out.ASWebAuthenticationSessionwith theoidcdemoscheme, silent refresh after a restart (refresh token from the keychain),GET /api/test200, sign-out returning through the identity provider's link and raisingLoggedOut.Known issue found while testing iOS (not in this PR)
A trimmed iOS build breaks the API client. With
TrimMode=partial, which iOS Release builds use by default, the trimmer removesEndpointOptions.Url's setter fromUno.Extensions.Http, because onlyConfigurationBinderreaches it by reflection. TheDemoApisection then binds to an object with a nullUrl, and the Refit call fails with "BaseAddress must be set on the HttpClient instance". Seen on the simulator built withMtouchLink=SdkOnly; the bundledUno.Extensions.Http.dllhad noset_Url, and adding<TrimmerRootAssembly Include="Uno.Extensions.Http" />fixed it. A Release device build was not tried. It affects Kiota clients too and any trimmed Release build (iOS, Android, WebAssembly): filed as unoplatform/uno.extensions#3266, fixed with a CI regression test in unoplatform/uno.extensions#3267. The sample's default Debug simulator build does not trim, so it is unaffected.Notes for reviewers
UI/Authentication.OidcDemo(hand-drivenIdentityModel.OidcClient, no Uno.Extensions) is left as is; this sample does not replace it.SystemBrowserIBrowserworkaround the desktop head needed before Uno.Extensions 8.0.0-dev.135; the last two commits remove it in favour of the library's broker.uno-authenticationskill in feat(skills): add uno-authentication hub studio#182 was dogfooded; the gaps it found in the provider went into feat(auth): sign in on Skia Desktop with a loopback WebAuthenticationBroker for the Oidc and Web providers uno.extensions#3261.🤖 Generated with Claude Code
https://claude.ai/code/session_01Sn8GmJ41W3eBgT7866J3jV