Public API & Options
AddBffAuthentication()
The primary composition-root API configures cookie authentication, OIDC and the package’s BFF conventions.
builder.Services.AddBffAuthentication();
Options can also be customized in code where supported by the package:
builder.Services.AddBffAuthentication(options =>
{
options.SaveTokens = true;
options.EnableServerSideSessions = true;
});
Prefer configuration files/environment settings for deployment-specific identity values and code configuration for deliberate application behavior.
MemoryCacheTicketStore
The reference implementation/sample uses a memory-backed ITicketStore for server-side sessions. It is suitable for local/single-instance scenarios and demonstrates the ticket-store extension point.
TokenForwardingHandler
A delegating handler that attaches the authenticated user’s persisted access token to configured downstream HttpClient requests when token persistence is enabled.
Built-in/default endpoint contract
The BFF surface includes login/logout/user/session-oriented endpoints; see Endpoints & SPA Integration for the consumer contract and configurable paths.
Startup validation
Configuration is validated eagerly so invalid authorities, endpoint paths or required settings fail early rather than surfacing only after an authentication attempt.