# `MishkaCmsCore.Accounts.Changes.RequireCurrentCode`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/accounts/__changes/require_current_code.ex#L5)

Asks the action's `:code` argument to be a current code from an authenticator app before the
write, and spends it (`MishkaCmsCore.Accounts.SecondFactor.use_code/3`): the account's own with
`of: :account`, the default, or the admin's running the action with `of: :actor` — who then has to
have set one up for their own account first. A refusal is
`MishkaCmsCore.Accounts.SecondFactor.Needed`, or the rate limiter's.

    change MishkaCmsCore.Accounts.Changes.RequireCurrentCode
    change {MishkaCmsCore.Accounts.Changes.RequireCurrentCode, of: :actor}

---

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