ipal-doctor: the raw 2FA view warning only for a view component

R3-1: the warning fired on any mention of the 2FA package's setup / verify view
in the config, so it stayed after the fix its own text suggests (SafeTotpView
with the path as ipalTotpView, plus the path in admin.dependencies). It now
warns only when the path is a view's Component.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-24 17:49:06 +01:00
co-authored by Claude Fable 5.2
parent b2c1dca5da
commit 3eee841dd0
4 changed files with 34 additions and 12 deletions
+3 -2
View File
@@ -610,8 +610,9 @@ guarded. The same holds when the project also lists `payloadTotp(...)` in `plugi
your `clientProps`, and `back` plus `searchParams` — both checked; read `back` from the props, not from
`useSearchParams()`, which still holds the raw query value.
- From a plugin listed after `ipalKit`, or under another key or route: that view is yours and is not wrapped. Use
`wrapTotpViews` or `safeAdminBack` in it. `ipal-doctor` warns when the config names the package's own view
(`@clocklimited/payload-2fa/rsc#TOTPVerify` / `#TOTPSetup`) directly.
`wrapTotpViews` or `safeAdminBack` in it. `ipal-doctor` warns when the config uses the package's own view
(`@clocklimited/payload-2fa/rsc#TOTPVerify` / `#TOTPSetup`) as a view's `Component`; the same path as the
`ipalTotpView` of `SafeTotpView`, or in `admin.dependencies`, is fine.
Wrapping views yourself, for a project that runs the 2FA package without `ipalKit`'s `twoFactor` (all from
`@intecion/ipal-kit`):