diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc38df..287ee49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ at boot. Entries start at 0.3.0. ## Unreleased +### The admin's recovery-code notice links to the flow the code was minted on + +After an admin generates a recovery code for a user, the notice's link opens the recovery flow the +code belongs to, where the user enters it. Before, it opened a new recovery flow at its email step, +which doesn't accept the code. + ### A verification or recovery code pasted with whitespace around it is accepted The code field on the verification and recovery pages takes a code with spaces or tabs around it. diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 69e6c51..46aa50b 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -257,3 +257,20 @@ Read most (opens and searches): - `README.md` 2 - `AGENTS.md` 1 - `src/ui/theme-switch.test.ts` 1 + +## Reading cost, chunk 4a258a237c53, finished 2026-10-31T12:04:07Z + +154777 new input tokens before the first commit. + +Read most (opens and searches): + +- `e2e-tests/full-flow.spec.ts` 9 +- `todo.md` 6 +- `README.md` 5 +- `src/auth/flow-view.ts` 5 +- `src/auth/flow-view.test.ts` 4 +- `src/auth/routes.ts` 4 +- `src/auth/kratos-public.test.ts` 3 +- `src/i18n/locales/en-US.ts` 3 +- `e2e-tests/compose.full.yml` 2 +- `src/auth/kratos-admin.ts` 2 diff --git a/examples/plugins/admin/views/partials/user-form-body.ejs b/examples/plugins/admin/views/partials/user-form-body.ejs index a9c3d78..9fe4183 100644 --- a/examples/plugins/admin/views/partials/user-form-body.ejs +++ b/examples/plugins/admin/views/partials/user-form-body.ejs @@ -2,7 +2,7 @@ Admin user create/edit form body, captured into the shell content slot. Config: form { action, csrfToken, submitLabel, cancelHref, fields: field.ejs config[] } edit? { nextLabel, stateAction, recoveryAction, deleteAction } (edit mode only) - recovery? { code? } shown after a recovery code is generated (recovery is code-based) + recovery? { code, link } shown after a recovery code is generated; link is the flow the code was minted on, the only one that accepts it error? string shown when a write was rejected %><% const form = locals.form; @@ -14,7 +14,7 @@ <%- include("partials/alert", { text: locals.error, tone: "neg" }) %> <% } -%> <% if (recovery) { -%> -
<%= recovery.code %><% } %><%= recovery.code %><% } %>