Log in
Model

Provider

Magento\TwoFactorAuth\Model\Provider

What it does

This class represents a two-factor authentication provider in Magento 2, managing the configuration and state of a specific 2FA method (like Google Authenticator, SMS, etc.).

Developers use this class to check if a provider is enabled, configure it for users, activate/deactivate it, and manage user-specific 2FA settings through its engine and user config manager.

Public Methods

  • isEnabled()
  • getEngine()
  • getCode()
  • getName()
  • getIcon()
  • isResetAllowed()
  • resetConfiguration()
  • isConfigured()
  • isActive()
  • activate()
  • getConfigureAction()
  • getAuthAction()
  • getExtraActions()