---
title: 'B2B Forced Login'
url: 'https://info.srv.kowal.co/docs/magento/modules/forced-login'
markdown: 'https://info.srv.kowal.co/docs/magento/modules/forced-login.md'
lang: en
date: '2026-11-30'
description: 'Redirect guests to sign in before they browse restricted pages. Choose whether to allow account registration and which store URLs should stay public.'
taxonomy:
  category:
    - docs
    - Magento
    - Modules
  tag:
    - b2b
    - customers
---

# B2B Forced Login

**Composer** `kowal/forcedlogin` · **Version** 1.0.2

## Product page

[B2B Forced Login — kowal.co](https://kowal.co/magento-2-b2b-forced-login-secure-store-content-for-logged-in-customers-only)

## Description

Redirect guests to the customer login page before displaying a restricted storefront page.

## For whom

For wholesalers that make their catalog available to signed-in customers while keeping selected information pages public.

## Features

- Two account access modes.
- An exception list for public pages.
- Store-view configuration.

## Installation

From the Magento root, with Composer access to the Kowal package, run

```sh
composer require kowal/forcedlogin
bin/magento module:enable Kowal_ForcedLogin
bin/magento setup:upgrade
bin/magento cache:clean
```

## Configuration

1. Under **Stores → Configuration → Kowal → B2B Forced Login → Settings**, select the scope and turn on **Extension Enabled**.
2. Under **Access to Website**, choose **Via Login** for existing accounts or **Via Login and Register** to allow guests to sign up.
3. Under **URL Exceptions**, enter one URL fragment per line for pages that should stay public.

## Requirements / notes

The package requires `kowal/base`. Exceptions match a substring of the request URI without regard to case. Use distinctive paths and check the scope of each exception on staging.

## FAQ

**Does this module approve new business accounts?**

It controls storefront access and whether guests can reach registration. Account approval requires a separate workflow.

## Verify the installation

```sh
bin/magento module:status Kowal_ForcedLogin
```

Open a category in a private window and check that it redirects to login. Visit an exception page, check registration against your chosen access mode, then sign in and revisit the category.

---

## Navigation

- Parent: [Magento 2 Extensions](https://info.srv.kowal.co/docs/magento/modules.md)
- Previous: [Discount Details](https://info.srv.kowal.co/docs/magento/modules/discount-details.md)
- Next: [Estimated Delivery Date](https://info.srv.kowal.co/docs/magento/modules/estimated-delivery-date.md)
