| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-09-23 | 6.1 kB | |
| v0.7.0 -- Admin 2FA reset, for staff and portal accounts source code.tar.gz | 2026-09-23 | 1.7 MB | |
| v0.7.0 -- Admin 2FA reset, for staff and portal accounts source code.zip | 2026-09-23 | 2.2 MB | |
| Totals: 3 Items | 3.8 MB | 0 | |
v0.7.0 — Admin 2FA reset, for staff and portal accounts
What's new
An admin can now clear someone's two-factor authentication. Until this release, losing your authenticator app and your recovery codes at the same time meant there was no way back into your account. A password reset didn't help — you'd still land on a code prompt you couldn't answer. Now, from Admin → Users → a user → Reset 2FA (staff) or from that person's customer or broker record → Reset portal 2FA, an admin clears the TOTP secret, the recovery codes and any 2FA lockout, and signs that user out everywhere. Their password is untouched — they sign in with it and set 2FA up again from scratch.
The one case that action can't cover — a single admin, locked out,
with nobody else to click the button — now has its own path. The
break-glass CLI (reset-admin-password.sh, the tool for a locked-out
super admin who still has server access) has a new --clear-2fa flag.
Without it, the script behaves exactly as before: it resets the
password and leaves 2FA alone. If the account it's resetting has 2FA
on, it now tells you so on stderr and names the flag to re-run with —
previously it reset the password and said nothing, leaving you back at
the same code prompt with no idea why. --clear-2fa clears the same
fields the in-app reset does and records it in the audit log.
2FA and password events are now audited, staff and portal. Before this release, none of this was logged anywhere: a company admin had no way to tell whether a user's second factor had been quietly removed, or by whom. Every enrolment, disable, admin reset (in-app or from the CLI), password change, and reset-link redemption now writes one row to the audit log — actor, target, surface (staff, portal, or the CLI), and never a secret, a password, or a code.
Why the two actions are separate
Password reset and 2FA reset are two different admin actions, on purpose — not one button that does both. Coupling them would turn every password-reset token into a way around 2FA, and this install has no mailer, so reset tokens already travel through channels worth being careful with: an admin-generated link, and nginx's own access log if someone reads it. Keeping the two separate means a password-reset token alone can never be used to take over a 2FA-protected account.
Resetting a portal user's 2FA needs admin.user.update, not the
weaker permission that sends a portal password-reset link. A sales
manager can send a customer or broker a reset link today; that
permission alone does not let them clear that account's 2FA. Without
this split, a sales manager could take over a broker's portal account
and approve NOCs as that broker.
Also fixed: the 2FA lockout could survive turning 2FA off
Found while building the reset above, not reported: if you got locked out of 2FA by entering wrong codes, then disabled 2FA and re-enrolled within the five-minute lockout window, the first code from your new authenticator was refused — a lock left over from the authenticator you just discarded. It cleared itself after five minutes, which is why it went unnoticed until now. Fixed for self-service disable and both the new admin resets, staff and portal.
Honest caveats
- After a 2FA reset, another signed-in device can stay logged in for
up to 15 minutes. The reset revokes every refresh token immediately,
so no session can renew — but an access token issued just before the
reset stays valid until it expires on its own
(
JWT_ACCESS_EXPIRES_IN, 15 minutes by default). This is a pre-existing property of how sessions work here, not something new to this feature, and it's worth knowing if you're resetting 2FA because an account may be compromised. reset-admin-password.shhasn't been run through shellcheck since--clear-2fawas added. It isn't installed in the environment that built this release, and no CI job runs it yet. What has been checked:bash -nsyntax validation, the SQL it generates executed against a real Postgres, the new flag's logic run under the script's ownset -euo pipefail, and CI'snative-installjob now runs the whole script for real, seeded with a 2FA-enabled account, checking that the right thing happens with and without the flag.- Self-service 2FA disable still asks for no re-authentication, staff and portal — a stolen, already-signed-in session can turn 2FA off with nothing but the session itself. Pre-existing; this release doesn't change it.
--clear-2faalways resets the password too — there's no way yet to clear 2FA alone and keep the existing password. The common sole-admin case (lost the phone, still knows the password) works fine today, just with a new password as a side effect.
Is any action needed beyond upgrading?
No. No database migration, no new environment variable, and both new
endpoints use the existing admin.user.update permission, so every
company admin has this immediately after upgrading — nothing to
re-grant.
Also in this release
See CHANGELOG.md (github.com),
the [0.7.0] section, for the full detail, and
PR [#49] for the branch
this shipped from.
Upgrading
:::bash
cd /opt/openestate-src/deploy/native
sudo ./upgrade-native.sh --ref v0.7.0
Full procedure (backup, rollback behaviour, troubleshooting): Installation Guide.
Known issues
The known issues listed in the
v0.6.1 release notes still
apply, with one now resolved: this release closes the "no admin-side
way to reset a user's 2FA" gap that release named. Portal self-service
password-reset tokens still reach server logs in plaintext (this
install's only message provider logs message bodies) — unchanged by
this release, tracked in docs/todo.md.