Log in
Model

AdminAccessTokenService

Magento\TwoFactorAuth\Model\AdminAccessTokenService

What it does

This class extends Magento's admin access token service to enforce two-factor authentication (2FA) before tokens are issued.

It prevents direct token creation for admin users who haven't configured 2FA, instead sending them a configuration request via email.

Developers interact with this when implementing custom admin API authentication or when troubleshooting 2FA-related token issues.

Public Methods

  • createAdminAccessToken()
  • revokeAdminAccessToken()