Feature flags
:::info Status Outline — expand with a full worked example (e.g. adding a new flag and gating a page behind it). :::
Feature flags use Microsoft.FeatureManagement, registered on both planes:
- Server:
Kandra.Application.ConfigureServices.AddKandraApplication()callsAddFeatureManagement(), config-driven via the"FeatureManagement"appsettings section. - Login-time:
LoginServiceevaluates every enabled flag and stamps afeatureclaim per name into the JWT at login/refresh — optionally filtered by an unregistered-by-defaultIClientFeatureFilterhook, to keep server-only flags off the client token. - Client:
JwtFeatureDefinitionProvider(Kandra.ClientLib.Common) reads those claims back offIAuthenticationContext, registered viaservices.Replace(...)— the sameTryAdd-vs-order-independence reasoning as the localization chain.
There's no declarative UI-gating attribute yet — Blazor code calls
IFeatureManager.IsEnabledAsync(...) directly wherever a page needs to check a flag.