Repository navigation
What's changed
- Default change under Aspire:
AddZeroFactornow 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, soAddZeroFactor("auth", port: 7281)becomeshttps://localhost:7281.ZF_HOSTNAME,GetIssuerandWithReference(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-codehttp://0factor URLs instead of usingWithReferenceorGetIssuer. - Fix Blazor WebAssembly and oidc-client apps on
https://localhostsigning the user out seconds after sign-in. Over HTTPS theZF_SESSIONcookie is nowSameSite=None; Securelike Keycloak'sKEYCLOAK_IDENTITY, so session-status iframes andprompt=nonerenewals work cross-site. Over HTTP cookies staySameSite=Lax. - The Docker image still serves plain HTTP on 8080 by default. For HTTPS without Aspire, set
Kestrel__Endpoints__https__Url=https://*:8080andKestrel__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