# `MishkaCmsCore.Accounts.Checks.AuthGateOpen`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/accounts/__checks/auth_gate_open.ex#L5)

Policy check: passes unless the way in named by `:action` — `:register` or `:reset` — is closed
for whoever the action is for (`MishkaCmsCore.Accounts.AuthGate`). Put it on the action, above
the AshAuthentication bypass, with the gate's refusal as the policy's error:

    policy action(:register_with_password) do
      error_message &MishkaCmsCore.Accounts.AuthGate.refused(&1, &2, :register)
      forbid_unless {MishkaCmsCore.Accounts.Checks.AuthGateOpen, action: :register}
      authorize_if always()
    end

Registering is asked of the address it is for, resetting of the account being reset. Signing in
is asked after the password instead (`AuthGate.prepare/3`), where the account is known.

# `eager_evaluate?`

# `init`

# `prefer_expanded_description?`

# `requires_original_data?`

# `strict_check`

# `type`

---

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