I am working on a module that implements two factor authentication.

I have created an observer to the event customer_login , so just after when the customer has logged in, they are directed to a custom page for the two factor authentication, if authentication is successful he is directed to the home page.

But the problem is when the customer is in the custom page, he could change the URL and get to the home page(ie. without completing the two factor authentication process). How do I restrict the customer from navigating to other pages without completing the two factor authentication?

  • you need to set that authentication key also into the session so that you can check for it otherwise it will not work try to understand that how to restrict the customer without login first & then create this feature Feb 25, 2019 at 9:04
  • Thanks for the reply @ABHISHEKTRIPATHI I am new to magento, How do I restrict the customer login? Feb 26, 2019 at 5:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.