Table of Contents

Configure Authentication

This step covers the OIDC and bearer-token authentication model used by a standalone Blazor WebAssembly application.

Use this authentication model when the browser is responsible for obtaining credentials and the client calls the RecroGrid Framework API directly.

Registration model

A standalone Blazor WebAssembly application typically combines two pieces:

  • the Blazor OIDC authentication setup that acquires browser-side credentials;
  • AddRgfBlazorWasmBearerServices(...) so RecroGrid Framework uses the direct bearer-token application model.
builder.Services.AddOidcAuthentication(options =>
{
    builder.Configuration.Bind("Local", options.ProviderOptions);
});

builder.Services.AddRgfBlazorWasmBearerServices(builder.Configuration, logger);

What this enables

The bearer-token registration configures the client in WasmBearer auth mode and prepares the RecroGrid Framework client services for browser-to-API requests.

Use this setup when:

  • the browser authenticates directly with the identity provider;
  • the API accepts bearer-token-based requests from the client;
  • the client should not depend on host-managed session endpoints.

This authentication model belongs together with direct API access. If the host should own sign-in and downstream API traffic, switch to SessionAuth and the host/proxy application model instead.

Next step