Log in
Model

Leeway

Magento\TwoFactorAuth\Model\Config\Backend\Leeway

What it does

This class validates and processes the leeway configuration value for Two-Factor Authentication TOTP codes.

Developers use this as a backend model for admin configuration to ensure the leeway value (time tolerance for code validation) is numeric and falls within valid bounds (1 to period-1, where default period is 30 seconds).

It prevents invalid configuration that could break 2FA functionality.

Public Methods

  • processValue()
  • beforeSave()