Restricting Magento 2 catalog access with Forced Login

3 min read 6 views

Restricting Magento 2 catalog access with Forced Login

Don’t want everyone to browse your store? Do you have content only for logged-in customers?

Many Magento 2 store owners run B2B sales, test store changes, or offer products only to a selected group of customers. What then?

Kowal_ForcedLogin requires login on protected pages according to the selected access mode and URL exceptions.

The problem: anyone can view your store

By default, anyone who knows your store address can enter and see:

  • the full product offer,
  • prices, images, descriptions,
  • menu elements and category structure.

For wholesale, test, or seasonal stores, this is a serious risk:

  • your competitors can copy your offer,
  • new solutions may be visible before launch,
  • customers will see an “unfinished” store.

The solution: the Kowal_ForcedLogin module

This lightweight, simple module lets you force login before entering the store. It works automatically and requires no technical knowledge.

What can the module do?

  • Require login on protected pages according to the selected mode and configured exceptions.
  • Allows you to add exceptions, such as /contact or /terms,
  • No changes to Magento files — safe and quick installation,
  • Check the supported Magento 2.4.x version, theme, cache and all access channels before deployment.

What does it look like in practice?

  • Test the protected page before and after logging in, including mobile access.
  • Review URL exceptions, login, registration and password recovery.
  • Test the protected page before and after logging in, including mobile access.

Who is this module for?

  • B2B wholesale stores,
  • Test or beta-stage stores,
  • Store owners who want to control who can see the offer.

Benefits of using ForcedLogin

  • You secure access to the store,
  • You protect sensitive data, such as wholesale prices,
  • You avoid the issue of customers “previewing changes,”
  • You save time — installation and configuration take just a few minutes.

How to install the module?

composer require kowal/forcedlogin
php bin/magento module:enable Kowal_ForcedLogin
php bin/magento setup:upgrade

Detailed instructions are available here: Read the module installation instructions

Summary

If you want your Magento store to be visible only to logged-in customers, this module will do it for you. You can easily block access to the public store while still keeping the option to add exceptions.

Explore the module scope
Buy the module in the store →
Contact us →

Scope and limitations

Forced Login controls access to selected storefront pages. It does not patch security vulnerabilities or protect every admin and API channel. Check registration rules and configured exceptions; account approval requires a separate solution such as CustomerApproval.

Keep reading

How to Reduce Manual B2B Sales Handling in Magento 2?

How to Reduce Manual B2B Sales Handling in Magento 2?

7 min read 12 views
See how Kowal B2B Suite reduces manual order handling and adds contract pricing, RFQ, limits, approvals, and documents to Magento 2.
Read more
Update cookie preferences