Developer API

An API provides a way for the Magento solution and technical partners to utilise Login module’s tokenisation system to generate secure login links as well as validating the the links as customers arrive back to the site from email link.

AuthenticationManagementInterface API provides methods like

  • createToken to create a token from customer email and return a TokenInterface
  • The TokenInterface can then be used with tokenizeUrl method to generate a secure login link (string), which can be sent to the customer via an email
  • Optionally sendOtp could be utilised for full login experience (create token + generated link + send email) and redirect the customer to a custom (next) URL eventually.

TokenRepositoryInterface API provides

methods like getCustomerTokens and getActiveToken, provide an easy way add validation to your own custom controllers