Magento 2 Forced Login: which URLs to test as a guest and a customer

2 min read

Silver 3D illustration with accents: navy and ochre — Magento 2 B2B Forced Login – Secure store content for logged-in customers only

Closing a B2B offer starts with deciding which pages guests may see. A redirected home page is not enough for acceptance: visitors can arrive directly at a product, category or previously saved URL.

Kowal B2B Forced Login sends signed-out requests for protected pages to login. It offers access modes and exceptions, with settings that can be adapted to individual Store Views.

Choose how accounts are created

Under Stores → Configuration → Kowal → B2BForcedLogin, select Login or Login and registration. The first suits prepared accounts; the second also exposes registration for new customers. Match that choice to the store's actual sales process.

Test login, password recovery and registration according to the chosen mode. A closed catalogue must not produce a loop that prevents the customer from reaching an action required to recover access to their account.

Prepare direct-entry cases

Open a product, category, search and selected CMS pages in a fresh session. Repeat the URLs as a signed-in customer. Test again after logout instead of relying on the earlier appearance of the same tab.

Include the actual cache and theme. A previously displayed screen does not establish the current access decision. If the offer is exposed through an API or custom storefront, verify those channels as a separate integration scope.

Keep exceptions narrowly defined

Exceptions are URL fragments entered one per line. Matching checks whether the request URI contains a fragment, without case sensitivity. This is not a list of exact URLs or wildcard patterns.

For every exception, test its intended destination and a different address containing a similar fragment. A broad word can match more pages than planned. Keep an exception table with its reason and the result of that comparison.

Accept behaviour in every view

Compare settings and results across all Store Views involved. Change views as a guest and a customer, then check return links and forms. One successful session does not establish the result throughout the installation.

The module checks whether the visitor is logged in. It does not approve a new company or review registrations. If self-registration stays available, define approval separately and test an account still awaiting acceptance. Only that complete journey shows whether the offer reaches the customers intended by the sales process.

Related stages of the process

Requiring login does not approve a new business. If registration stays open, define account approval separately and test login before acceptance. See Magento 2 Customer Approval – B2B customer registration control and the guide Magento 2 B2B customer approval: from registration to access.

Check features and configuration in the offering for Magento 2 B2B Forced Login – Secure store content for logged-in customers only.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)