Second-factor reset — a user without a code¶
The reset path is the page where a user regains access to the account without the second factor — after losing a phone, replacing a key, or with nothing at hand to prove identity. This chapter describes what that path does, how to enable it, and what the user sees.
What it is¶
The page sits at the application address, next to the sign-in screen: <application address>/_amfa/reset.
The user enters the account name, receives a one-time code at the e-mail address, and after entering the
code the gateway:
- revokes every trusted browser of that account,
- issues a new reset code and shows it once.
The code issued after a reset has the reset purpose: it serves the next reset, it signs nobody in and it is
not the second factor. Sign-in emergency codes are a separate mechanism — the engine's paper sheets, the
Emergency codes view in the panel. A reset therefore ends with the trusted browsers revoked and a new
reset code, not with the state an administrator produces by hand when setting up the second factor.
This is not a password reset. The domain password is left untouched — the gateway does not touch the directory; the reset covers the second factor only.
| Second-factor reset (this chapter) | Password reset | |
|---|---|---|
| What it covers | the second factor: trusted browsers and the emergency code | the domain password |
| Where it happens | <application address>/_amfa/reset |
the sign-in screen (when the directory requires a change) or the directory |
| Password in the directory | left untouched | set to a new value |
Emergency codes are issued and viewed in the gateway panel, under Emergency codes (subject sheets: serial, state, number of used codes, print). That is a mechanism independent of the reset switch — codes issued earlier keep working even with the reset path disabled.
Enabling it¶
The whole surface sits behind a single switch: MFA policy of the application profile, section
"Second-factor reset (code sent by e-mail from the directory)". The Reset path enabled switch covers the
page and the two operations behind it. With the switch off, the page and the API respond as non-existent
(404 not_found), so the user never sees a trace of the feature.

| Field | What it sets | Range | Default |
|---|---|---|---|
| Reset code length (characters) | how many characters the code has in the message; dashes between blocks do not count towards the length | 12–40 | 20 |
| Reset code lifetime (seconds) | how long the code stays valid from the moment it is sent | 60 s – 24 h | 600 (10 minutes) |
| Failed attempts invalidating the reset code | after how many wrong entries the code stops working | 1–10 | 5 |
The code is single-use and short-lived, so the message with the code is used right away. The code's length is visible in the message itself: it is split into blocks of five characters, and letter case does not matter when entering it.
Where the address comes from¶
The address the code goes to comes from the reset address override for the account — set through the API
/gateway-admin/api/v1/reset-addresses (there is no panel screen for it yet — that is a later step). An account without an address receives no message, but
the response shown to the user is identical to the one for an account with an address: the page does not
reveal whether the account exists or has an address. Reading the address straight from the directory is a
separate deployment step; until it is enabled, the address for a profile is set through the API
/gateway-admin/api/v1/reset-addresses.
What the user sees¶
1. Account name. The user opens <application address>/_amfa/reset and enters their account name.

2. Code from the message. After pressing Send reset code, the page states that if the account has an e-mail address, a one-time code has just been sent to it, and shows the field for the code.

3. Result. After the code is accepted, the page shows the number of revoked trusted browsers and the new reset code.

The reset code is masked out in the screenshot: it is a value the user is meant to write down and keep, not documentation content — it appears on screen once and no second copy exists anywhere. The number of revoked browsers depends on the account; zero means the account had no trusted browsers.
The page's wording is in a single language (the tab title Reset your second factor, the heading
Verify your reset code) — the gateway interface is not translated per application.
What happens once the code is accepted¶
- every trusted browser of the account stops being trusted, so the next sign-in on each of them asks for the second factor again,
- a new reset code is created, shown together with the note that it is displayed only once; the previous code stops working,
- the gateway's event log records the code request, its acceptance, rejection and the invalidation of reset
codes, and the delivery log records the message with the code (template
reset.code); both logs are visible in the panel under Audit, and the delivery log under System → Messages → Delivery log.
Limits worth knowing¶
- The code goes only to the address from the override (see above) — there is no second copy for the
administrator, and the message body is the
reset.codetemplate. - Code requests count towards the account's rate limit — the same counter that protects sign-in (by default five failed events within a five-minute window lock the account for fifteen minutes). The lock covers the whole account, so a burst of reset requests also affects sign-in: the gateway then answers "too many requests" together with the time after which another attempt is possible.
- The surface answers under the application name — a request under a name that is not an application
profile reaches neither the page (the page answers
404 not_found) nor the API (403 forbidden). - With the switch off the page and the API behave as non-existent (
404), while emergency codes issued earlier keep working.