![]() |
VOOZH | about |
dotnet add package Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect --version 10.1.0
NuGet\Install-Package Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect -Version 10.1.0
<PackageReference Include="Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect" Version="10.1.0" />
<PackageVersion Include="Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect" Version="10.1.0" />Directory.Packages.props
<PackageReference Include="Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect" />Project file
paket add Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect --version 10.1.0
#r "nuget: Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect, 10.1.0"
#:package Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect@10.1.0
#addin nuget:?package=Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect&version=10.1.0Install as a Cake Addin
#tool nuget:?package=Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect&version=10.1.0Install as a Cake Tool
👁 NuGet Version
👁 NuGet Version
👁 NuGet Version
Official Website: RecroGrid Framework
Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect is the high-level ASP.NET Core host integration package for Blazor Web App style applications that use:
RGF stands for RecroGrid Framework.
Its purpose is to package the "host half" of the SessionAuth server-proxy architecture into one reusable setup layer.
Although this package is part of the RGF ecosystem, it is not limited to RGF-only scenarios. It builds on the reusable OpenID Connect host and token-management infrastructure from Recrovit.AspNetCore.Authentication.OpenIdConnect, so the same host-side sign-in, session, downstream token acquisition, and proxy pattern can also be used for non-RGF APIs.
In practice, this package combines:
Recrovit.AspNetCore.Authentication.OpenIdConnectRecrovit.RecroGridFramework.Client.Blazor.SessionAuthBecause of this, the package is the recommended app-level entry point when the browser should stay on the host origin, and the ASP.NET Core host should handle authentication, acquire downstream access tokens, and proxy the API calls on the user's behalf.
The downstream API can be an RGF API or any other API registered under Recrovit:OpenIdConnect:DownstreamApis, regardless of whether that API is hosted together with the app or on a separate server.
For SSR-originated RGF calls, the package also uses host-aware cookie forwarding so server-side requests can participate in the same authenticated host session as the browser.
At a high level, the flow looks like this:
Recrovit.RecroGridFramework.Client.Blazor.SessionAuth in ServerProxy mode./authentication/... endpoints and the host-side proxy infrastructure on the host.This makes the package the bridge between:
Use this package when all of the following are true:
AddRgfBlazorSessionAuthClientServices(...)If the browser calls the API directly with bearer tokens, use a direct client-side auth setup (AddRgfBlazorWasmBearerServices) instead of this package.
In the server-side app Program.cs, register the host package and map its endpoints/components. The Recrovit component routing setup stays explicit, while the host package wrappers add the Razor Components, OIDC host, SessionAuth SSR, and component-mapping infrastructure automatically.
using Recrovit.AspNetCore.Components.Routing.Configuration;
using Recrovit.AspNetCore.Components.Routing.Models;
using Recrovit.RecroGridFramework.Client.Blazor;
using Recrovit.RecroGridFramework.Client.Blazor.Host.OpenIdConnect.Configuration;
using Recrovit.RecroGridFramework.Client.Blazor.UI;
var builder = WebApplication.CreateBuilder(args);
// Required so the host can discover the server and client routes used by the shared Blazor app.
builder.Services.AddRecrovitComponentRouting(options =>
{
options.AddRouteAssembly(typeof(App).Assembly);
options.AddRouteAssembly(typeof(BlazorApp.Client._Imports).Assembly);
options.DefaultLayout = typeof(MainLayout);
options.SetNotFoundPage(RecrovitRoutesKind.Host, typeof(BlazorApp.Client.Pages.NotFound));
});
// Required to register the OIDC-aware host services together with the standard ASP.NET Core/Blazor infrastructure they wrap.
builder.AddRgfBlazorServerProxyOpenIdConnectRazorComponents();
builder.AddRgfBlazorServerProxyOpenIdConnectHost();
var app = builder.Build();
app.UseHttpsRedirection();
// Required to expose the proxy endpoints, initialize RGF services, and map the shared root component.
app.MapRgfBlazorServerProxyOpenIdConnectEndpoints("/not-found");
// Required to initialize the server-side RGF runtime before the app starts serving requests.
await app.Services.InitializeRgfBlazorServerAsync();
await app.Services.InitializeRgfUIAsync(loadResources: false);
// Required to map the shared app root so the host can render the client/server Razor components.
app.MapRgfBlazorServerProxyOpenIdConnectComponents<App>(typeof(BlazorApp.Client._Imports).Assembly);
await app.RunAsync();
These calls automatically add the following ASP.NET Core/Blazor infrastructure, so you do not need to register the standard framework services separately for this integration:
builder.AddRgfBlazorServerProxyOpenIdConnectRazorComponents()
Razor Components, interactive server render mode, interactive WebAssembly render mode, and authentication state serializationbuilder.AddRgfBlazorServerProxyOpenIdConnectHost()
cascading authentication state, antiforgery, distributed memory cache, IHttpContextAccessor, the default and downstream proxy HttpClient registrations, ASP.NET Core Cookie/OpenID Connect authentication, ASP.NET Core authorization, and Data Protection setupapp.MapRgfBlazorServerProxyOpenIdConnectComponents<App>(...)
static assets mapping, root Razor component mapping, interactive server/WebAssembly render modes on the mapped root, and optional additional client assembly mappingThat means you should not separately repeat AddRazorComponents(), AddAuthentication(), AddAuthorization(), AddAntiforgery() and similar framework registrations unless you are intentionally customizing the underlying setup.
MapRgfBlazorServerProxyOpenIdConnectEndpoints(...) also applies the standard middleware sequence used by the underlying OIDC host package:
/authentication/... and RGF proxy endpoint mappingUpdate App.razor so the shared root component can choose the correct renderer for each route.
For additional routing configuration options, see Recrovit.AspNetCore.Components.Routing.
This setup lets the host render server-routed pages through RecrovitRoutes while still handing WebAssembly-style routes off to the interactive client app. It is needed because the OIDC host package and the RGF proxy endpoints live on the server-side host, so server routes must stay on the host pipeline to get the expected authentication, reconnect, and proxy behavior.
<head>
<HeadOutlet @rendermode="CurrentRenderMode" />
</head>
<body>
@if (CurrentPageDefinition.RouteMode is RecrovitRouteMode.StaticServer or RecrovitRouteMode.InteractiveServer)
{
<RecrovitRoutes @rendermode="CurrentRenderMode" Kind="RecrovitRoutesKind.Host" />
@if (CurrentPageDefinition.RouteMode == RecrovitRouteMode.InteractiveServer)
{
<ReconnectModal />
}
}
else
{
<BlazorApp.Client.Routes @rendermode="CurrentRenderMode" />
}
<script src="@Assets["_framework/blazor.web.js"]"></script>
</body>
</html>
@inject RecrovitRouteModeResolver RecrovitRouteModeResolver
@code {
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
private RecrovitPageRouteDefinition CurrentPageDefinition
=> RecrovitRouteModeResolver.Resolve(HttpContext?.Request.Path.Value);
private IComponentRenderMode? CurrentRenderMode
=> RecrovitRouteModeMapper.GetDefaultTopLevelRenderMode(CurrentPageDefinition.RouteMode);
}
The host package proxies to a named downstream API called RgfApi.
For additional OpenID Connect host and downstream API configuration options, see Recrovit.AspNetCore.Authentication.OpenIdConnect.
In the server-side app configuration, register that downstream API under Recrovit:OpenIdConnect:DownstreamApis:RgfApi and point it to the real downstream API.
Minimal example:
{
"Recrovit": {
"OpenIdConnect": {
"Provider": "MainProvider",
"Providers": {
"MainProvider": {
"Authority": "https://idp.example.com",
"ClientId": "client-id",
"ClientSecret": "client-secret",
"Scopes": [ "openid", "profile", "offline_access" ]
"CallbackPath": "/signin-oidc",
"SignedOutRedirectPath": "/"
}
},
"DownstreamApis": {
"RgfApi": {
"BaseUrl": "https://rgf-api-app.example.com",
"Scopes": [ "api.scope" ]
}
}
}
"RecroGridFramework": {
"API": {
"ProxyBaseAddress": "https://app-host.example.com"
}
}
}
}
Why this registration matters:
RgfApiThis package is only the server-side half of the solution.
For the client-side configuration details, see the , especially its usage guide.
That client-side registration is responsible for:
/authentication/session/authentication/principal/authentication/login?returnUrl=... when reauthentication is requiredThis host package supplies the matching server-side infrastructure that those client-side behaviors depend on.
Through the underlying OIDC host package, the host exposes these reusable endpoints under the configured base path, which defaults to /authentication:
GET /authentication/loginPOST /authentication/logoutGET /authentication/sessionGET /authentication/principalSessionAuth depends specifically on:
login for reauthentication redirectssession for determining whether the current host session is still validprincipal for rebuilding the interactive client-side ClaimsPrincipal from the host sessionRecrovit.AspNetCore.Authentication.OpenIdConnect: reusable OpenID Connect host infrastructure used by this packageRecrovit.RecroGridFramework.Client.Blazor.SessionAuth: client-side and SSR session-auth support for RGF Blazor applicationsRecrovit.RecroGridFramework.Client.Blazor.UI: higher-level Blazor UI package typically used by the interactive clientRecrovit.RecroGridFramework.Client.Blazor: base Blazor integration layer for the RGF client stackRecrovit.RecroGridFramework.Client: core RGF client runtime and HTTP services| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.0 | 115 | 4/24/2026 |