B2B Force Login for Magento 2

Magento 2 B2B Forced Login is a module designed for stores operating in the 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.
Compatibility
2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
€30.75
per item
Email to a Friend

Enquire about this product

Description / B2B Force Login for Magento 2

MAGENTO 2 · B2B SALES · STORE ACCESS

Make your offer available to customers after login.

Kowal B2B Forced Login

Turn your Magento store into a sales environment for business partners. Redirect visitors who are not logged in to the login page, choose access to registration, and set exceptions for required URLs.

Required login · Two access modes · Per-store settings

HOW IT WORKS IN PRACTICE

01 · You choose the access mode
You provide login or login with registration.

02 · A guest opens the store
Protected pages redirect to login.

03 · The customer uses the offer
After logging in, they can browse the store.

What does your store gain?

Explore the module features, use cases, and configuration method.

Offer available after login

Magento 2 B2B Forced Login was created for wholesalers, distributors, and stores dedicated to business partners. It limits content browsing by users who are not logged in and helps protect commercial information: price lists, offers, and products.

After activation, protected guest requests are directed to the login page. The access scope depends on the selected mode and configured exceptions.

Two operating modes

  • Login: the store provides the login path and supported password recovery actions.
  • Login and registration: the customer can also go through the account creation pages.

Match restrictions to the way you acquire business partners: accounts created by your team or new customer requests submitted through the store.

Separate settings for store views

In the Magento admin panel, you can enable and disable the module and select the access mode for individual store views. You can find the configuration in Stores → Configuration → Kowal → B2BForcedLogin.

This lets you adapt access to the store structure and sales rules in a given view.

Exceptions for required URLs

In the configuration, you can enter URL fragments excluded from forced login, one per line. Matching checks whether the request URI contains the given fragment, without case sensitivity.

Use clear fragments and check their scope. This is partial address matching, not a list of exact URLs or wildcard patterns.

Login and business partner verification

Forced Login checks whether the customer is logged in. It does not approve registrations or verify companies on its own. The goal stated in the previous description, prices and products only for verified customers, is achieved by combining the login requirement with account approval.

You can use Kowal Customer Approval for this process. The implementation should also be checked with cache, the theme, and other access channels to the offer.

Magento and implementation support

The product description indicates compatibility with Magento 2.4.x. The package uses kowal/base. The Kowal team offers technical support, implementation assistance, and development tailored to individual customer needs.

During implementation, check login, registration, password recovery, and selected exceptions in each target store view.

Installation via Composer

Package kowal/forcedlogin, module Kowal_ForcedLogin. Configure access to the Kowal repository, install the package, enable the module, update Magento, and clear cache. In production, include compilation and static content deployment according to the store process.

From configuration to results

1. You choose the access mode
You provide login or login with registration.

2. A guest opens the store
Protected pages redirect to login.

3. The customer uses the offer
After logging in, they can browse the store.

Wholesale store with an offer for business partners

A visitor without an active session is sent to the login form. After logging in, they can see the products and price lists prepared for store customers.

If you allow self-registration, add Customer Approval so that access also requires an administrator decision.

Organize access to your B2B offer

Want to adapt the module to your store? Ask about implementing Kowal B2B Forced Login and discuss the configuration or required extensions.

More Information

Theme compatibility Luma / Blank, KOWAL

Questions and Answers

Can I require customers to log in before viewing my Magento 2 store?

Yes — after enabling the module, every visitor will be required to log in or register before gaining access to the store content.

Can exceptions be set—pages that will be available without logging in (e.g., “Contact,” “Terms and Conditions”)?

Yes — the module offers configuration of exceptions that can be available without logging in.

Does the module require modifications to Magento core files or the template?

No — the module description indicates that it works as an extension compatible with the Magento 2 architecture, without the need to overwrite system files.

Which stores is this module most useful for?

Most suitable for B2B stores, test stores, or closed offers where only a verified customer should have access.

After installation and activation, are users who are not logged in automatically redirected to the login page?

Yes — the module requires users to log in before accessing the store content and can redirect users who are not logged in to the login page.

Is it possible for it to work only partially—for example, allowing access to only some pages without logging in?

Yes—although the main function is to fully require login, the module allows you to configure exceptions and selectively block access to specific pages or views.

Is the module compatible with multiple store views (multi-store) and Magento 2 versions?

Yes — the manufacturer's description states compatibility with Magento 2.3–2.4.x and readiness for B2B/multi-store environments.

Can requiring login negatively affect SEO or site indexing?

Yes — if the entire store is closed and available only to logged-in users, search engines may not have access to index it, which should be taken into account in the SEO strategy. (General knowledge about such solutions).

Is the module installation simple?

Yes — according to the documentation, installation comes down to adding it via Composer, enabling the module, and configuring it in the Magento admin panel.

After purchasing the module, do I receive technical support and updates from the manufacturer?

Yes — the manufacturer states that support and updates are provided for B2B modules.

Change Log

Version: 1.0.2

15.02.2026

Added

  • Added a new URL Exceptions configuration field in the panel:
    • Stores > Configuration > Kowal > B2B Forced Login > Settings
  • The field uses a line-by-line format: each line is a URL fragment that should 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

It enables proper handling of webhooks and integration endpoints, such as Stripe in B2B stores, which must be available without a customer session.

Example use cases

    • stripe/webhook
    • rest/V1/stripe
    • /payment/stripe/webhook

Module Installation Instructions

Installation via Composer

You will receive Composer repository access credentials, the customer email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the received token. Run the commands in the Magento root directory.

composer config repositories.kowal composer https://repo.kowal.storecomposer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'composer require kowal/forcedlogin

Completing the installation

After installing the package, update Magento and clear cache:

php bin/magento setup:upgradephp bin/magento cache:flush

In a production environment, also run DI compilation and deploy static files according to your store deployment process.

Press to skip carousel

We found other products you might like!

Write Your Own Review
You're reviewing: B2B Force Login for Magento 2
Your Rating:
Quality
Price
Support
loader
Loading...

You submitted your review for moderation.

Related Posts

Restricting Magento 2 catalog access with Forced Login

Restricting Magento 2 catalog access with Forced Login

3 min read 6 views
Want your Magento 2 store to be visible only to logged-in customers? The Kowal_ForcedLogin module lets you easily block store access for users who are not logged in, without modifying the code. An ideal solution for B2B stores, test stores, or stores with a private offer.
Read more
Update cookie preferences