v0.7.3
[0.7.3]
Adds step-up authentication — a strict, single-use 2FA confirmation gate for sensitive actions
(change password, view recovery codes, remove a method), independent of the login flow. OpenAPI moves
to 0.7.3; the .NET and all TypeScript packages bump to match.
Added
- Step-up barrier (.NET) —
[RequireTwoFactor](MVC action filter) and.RequireStepUp()(minimal-API endpoint filter) gate any endpoint: an enrolled user must present a valid step-up token or the call returns403 STEP_UP_REQUIRED(carrying the available methods); a user with no 2FA passes through. The decision lives once inOmni2FA.Core'sIStepUpEvaluator. New/api/2fa/stepup/start|resend|verifyendpoints (session-authenticated mirrors of/challenge/*);verifymints a single-use step-up token (purpose=2fa-stepup) via the newIPreAuthTokenIssuer.IssueStepUp/ValidateStepUp. NewStepUp.Ttl+ header-name options. - Single-use enforcement —
IStepUpNonceStorerecords spent token ids until expiry; defaultInMemoryStepUpNonceStoreis single-instance (register a shared store, e.g. Redis, for multi-node — otherwise a token spent on one node has a replay window on the others bounded by the TTL). The token is bound to the caller, so a stolen token can't be replayed against another account. - Step-up (
@omni2fa/core) —client.startStepUp/resendStepUp/verifyStepUp, thestepUpMachine, theSTEP_UP_HEADERconstant, and theSTEP_UP_REQUIREDerror code. Transport-agnostic by design — the library never makes the protected request, so cookie- and Bearer-session hosts integrate identically. - Step-up (
@omni2fa/react) —useStepUp()returningconfirmTwoFactor(methods)(shows the prompt, resolves a single-use token) plus the prompt state (active,methods,status,pick/submit/resend/cancel); reuses the existing challenge UI. The host detects403 STEP_UP_REQUIREDand replays the request with the header in its own fetch/axios layer.
Changed
ITwoFactorChallengeServicegainsVerifyStepUpAsync; login and step-up share one verification core (no behavior change to login).- Docs (
README,ARCHITECTURE,FLOWS,ASPNETCORE,ERROR_CODES) and theexamples/fullhost (a step-up-protectedPOST /user/change-password) updated.
[0.7.2]
Patch: EF Core 10 host compatibility. .NET packages only — no API contract change, so OpenAPI stays
at 0.7.1 and the TypeScript packages are unchanged.
Fixed
- EF Core 10 host compatibility (
MissingMethodExceptionon bulk delete) —Omni2FA.AspNetCore.EntityFrameworkCorenow multi-targetsnet8.0;net10.0, compiling each build against its matching EF Core major (8.0.x / 10.0.x). The previous singlenet8.0build boundExecuteDeleteAsyncto EF Core 8'sRelationalQueryableExtensions; under a host running EF Core 10 that method has moved, so recovery-code wipe and challenge purge threwMissingMethodExceptionat runtime. NuGet now hands each host the matching asset.Omni2FA.CoreandOmni2FA.AspNetCorestaynet8.0(consumed down-level by net10 hosts).