# `MishkaCmsCoreWeb.Live.Admin.Components.TwoFactor`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core_web/live/admin/components/two_factor.ex#L5)

The signed-in account's authenticator app, a security card on the settings page's Preferences tab
(`SecurityCards`): set up, or turned off. See `MishkaCmsCore.Accounts.SecondFactor` for what it
changes at sign-in. Turning it on or off tells the other cards (`:account_security_changed`), so
the recovery codes card follows.

Setting one up is the `totp` strategy's two steps. `setup_with_totp` stores nothing and hands
back the `otpauth://` address and a setup token, kept in this component while the QR code and the
secret are shown; `confirm_setup_with_totp` stores the secret once a code from the app matches.
Turning it off asks a current code (`disable_totp`).

    <.live_component module={TwoFactor} id="two-factor" current_user={@current_user} />

---

*Consult [api-reference.md](api-reference.md) for complete listing*
