# `Sigra.Plug.RequirePasswordChange`
[🔗](https://github.com/sztheory/sigra/blob/v1.20.0/lib/sigra/plug/require_password_change.ex#L1)

Plug that redirects users who must change their password.

When a user has `must_change_password: true` set on their record
(typically by an admin via `Sigra.Account.require_password_change/2`),
this plug calls the error handler with `:must_change_password` and halts
the connection, forcing them to the password change form.

This mirrors the `Sigra.Plug.RequireSudo` pattern.

## Options

  * `:error_handler` - Required. Module implementing `Sigra.Plug.ErrorHandler`.

## Example

    plug Sigra.Plug.RequirePasswordChange,
      error_handler: MyAppWeb.AuthErrorHandler

# `call`
*since 0.8.0* 

Check if user must change password and halt if so.

# `init`
*since 0.8.0* 

Initialize plug options.

---

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