Class SeedWebClientHostedService

Assembly: redb.Identity.Core.dll

Startup seeder that ensures the canonical Web Console OIDC client (default
identity-web) exists in the OpenIddict application store. Sister to
— together they make a fresh
install runnable end-to-end with no manual bootstrap step:
hashes the default
password for the seeded admin user.This service registers the OIDC client so the Web BFF can complete
/connect/authorize.
Behaviour:
Resolves via a transient scope.Looks up the client by .If found → no-op (idempotent across restarts; respects clients
created by bootstrap-admin / dynamic registration / management API).Otherwise creates a Public client (or Confidential when a
is supplied) with
authorization_code + refresh_token + PKCE-required.
Convenience for fresh dev/demo deployments only — production should disable
this and provision clients explicitly via the management API.

Implemented as an hooked into
— Tsak modules have
no generic IHost, so route-context lifecycle is the canonical startup
extension point.

public sealed class SeedWebClientHostedService : IRouteLifecycleListener

Inheritance

Object→SeedWebClientHostedService

Implements

Methods

OnContextStarting(IRouteContext, CancellationToken)

Fired before the context starts compiling and starting routes.

public Task OnContextStarting(IRouteContext context, CancellationToken cancellationToken)

Constructors