Model

RequestCustomerToken

Magento\LoginAsCustomerGraphQl\Model\Resolver\RequestCustomerToken

What it does

This GraphQL resolver allows authorized admin users to generate authentication tokens for customers via the 'Login as Customer' feature.

Developers use this when implementing GraphQL endpoints that enable admins to access the storefront as a specific customer for support or assistance purposes.

It validates admin permissions, checks if the feature is enabled, and creates a customer token using the provided email address.

Public Methods

  • resolve()