Magento 2 B2B Forced Login – Secure store content for logged-in customers only
Magento 2 B2B Forced Login is a module designed for stores operating in a B2B model that require full control over access to website content. With this functionality, you can limit store visibility to logged-in customers only – eliminating random traffic and protecting sensitive commercial information.
Why choose Forced Login?
- Full access control – redirect every user who is not logged in directly to the login page.
- Configurable for every store – separate settings for each store view in Magento.
- Two operating modes – block all pages except login or login and registration.
- Ideal solution for wholesale sales – your prices and products will be visible only to verified customers.
Module features
- Enable or disable the module separately for each store.
- Select the access restriction level, either full lockout or access with registration available.
- Simple and clear configuration in the Magento 2 admin panel.
- Compatible with Magento 2.4.x.
Use cases
The module is an excellent fit for B2B environments, wholesalers, and stores dedicated to business partners or distributors where price lists, offers, and products must be hidden from unauthorized users.
Technical support
All our modules include technical support. If any issues occur, we provide implementation assistance and module development tailored to the individual needs of the customer.
Choose security and professionalism in B2B sales with Magento 2 B2B Forced Login by KOWAL.
Version: 1.0.2
15.02.2026
Added
- Added a new configuration field URL Exceptions in the panel:
- Stores > Configuration > Kowal > B2B Forced Login > Settings
- The field uses a line-by-line format: each line is a URL fragment to be skipped by the forced login mechanism.
Changed
- Extended the ForceCustomerLoginObserver logic:
- the module reads the list of exceptions from the configuration,
- compares the current request URI with the entered fragments, case-insensitive,
- if the URL matches an exception, it does not redirect to login.
Why
Enables proper handling of webhooks and integration endpoints, such as Stripe in B2B stores, that must be accessible without a customer session.
Example use cases
- stripe/webhook
- rest/V1/stripe
- /payment/stripe/webhook























