FenixKit MongoDB + Keycloak .NET Minimal API Starter Kit
.NET 8  ·  .NET 10  — same price

.NET Minimal API
Starter Kit — MongoDB + Keycloak

Auth done right. Keycloak JWT via OIDC, role-based policies, OAuth2 PKCE in Swagger, and a pre-built realm — zero manual configuration required.

Use code FIRSTXPEOPLE for €15 off → €30

What's inside.

MongoDB Keycloak JWT Bearer / OIDC OAuth2 PKCE ErrorOr Docker Compose Swagger / Swashbuckle .NET 8 .NET 10

Everything in the MongoDB kit

BaseRepository with 7 hooks, offset + cursor pagination, ErrorOr result pattern, RFC 7807 error handler, health checks, Swagger with XML docs, Docker Compose. All included.

Keycloak JWT Bearer via OIDC

The API validates tokens issued by Keycloak using OIDC discovery. No manual key management. Configuration points to the Keycloak realm and the middleware handles the rest.

Role-based policies

Two policies pre-configured: Authenticated (any valid JWT) and AdminOnly (requires the admin realm role). Add more in one place and apply with .RequireAuthorization().

OAuth2 PKCE in Swagger

The Swagger UI includes an Authorize button wired to the Keycloak OIDC PKCE flow. Click, log in with a test user, and all subsequent requests in Swagger carry the Bearer token automatically.

Pre-built realm — zero manual config

A Keycloak realm export is imported automatically on first boot. Two test users are ready: admin-test and user-test. No Keycloak admin UI setup required.

401 / 403 as ProblemDetails

Unauthenticated and unauthorized responses return RFC 7807 ProblemDetails instead of empty body responses. Consistent with every other error format in the kit.

One-time payment. Yours forever.

Full source code, private docs, unlimited projects, entire team included.

45

or €30 with code FIRSTXPEOPLE

Secure checkout via Lemon Squeezy  ·  Instant delivery

Need cache too? See the full stack kit →