Skip to content

0factor 0.1.8

Latest

Choose a tag to compare

@c4l3b c4l3b released this 21 Oct 14:33
6c42075

What's changed

  • Default change under Aspire: AddZeroFactor now serves HTTPS when Aspire has a trusted ASP.NET Core developer certificate (dotnet dev-certs https --trust), like Aspire's Keycloak. The endpoint keeps its name (http) and port, so AddZeroFactor("auth", port: 7281) becomes https://localhost:7281. ZF_HOSTNAME, GetIssuer and WithReference(auth, realm: ...) follow automatically. Without a trusted certificate nothing changes.
  • Opt out to stay on HTTP: builder.AddZeroFactor("auth", port: 7281).WithoutHttpsCertificate();. Do this if your apps hard-code http:// 0factor URLs instead of using WithReference or GetIssuer.
  • Fix Blazor WebAssembly and oidc-client apps on https://localhost signing the user out seconds after sign-in. Over HTTPS the ZF_SESSION cookie is now SameSite=None; Secure like Keycloak's KEYCLOAK_IDENTITY, so session-status iframes and prompt=none renewals work cross-site. Over HTTP cookies stay SameSite=Lax.
  • The Docker image still serves plain HTTP on 8080 by default. For HTTPS without Aspire, set Kestrel__Endpoints__https__Url=https://*:8080 and Kestrel__Endpoints__https__Certificate__Path/__KeyPath. TLS support adds about 3 MB to the image.

See PR #23 and the full changelog.

Install

dotnet add package ZeroFactor.Aspire.Hosting --version 0.1.8
docker pull c4l3b/0factor:0.1.8