Magento 2 Experts — Hyvä Theme, Tailwind CSS & SEO from a Single Source ›

Magento 2 force login: shop for signed-in customers only

Magento 2 Extension Hyvä Ready Magento 2.4.x

SKU: FORCELOGIN1

  • Login required for the whole shop or selected areas
  • Exception list with imprint, privacy and password reset prefilled
  • Return to the requested page after sign-in
  • Per store view and customer group
Auf Lager
€99.00

Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.

No download, but personal setup

No download, but personal setup. This product is not a downloadable software package for self-installation. With your order, you commission Mironsoft to individually set up this module in your shop. We will get in touch with you within 2 business days — we'll sort out the details and payment together then.

This offer is aimed at business owners and companies running a Magento 2 shop.

Overview

Magento 2 force login: a closed shop with clear rules

With Mironsoft Force Login you use Magento 2 force login to switch off access for visitors who are not signed in. When someone opens a locked page, the module redirects to the login page, shows a notice and returns the customer to the originally requested page after sign-in. That gives you a closed reseller shop without hiding pages one by one.

The typical use is B2B: prices and range are meant for vetted business customers only. Shops that use Magento 2 force login often combine the login requirement with customer approval, so new customers can register but order only after your review. The module itself only checks whether someone is signed in.

The extension is built for Hyvä Themes, works server-side and needs no additional JavaScript. We set it up in your shop and create the exception list together with you.

6 Features

Access only for customers you know

For reseller shops and price lists that must not be public: Magento 2 force login with clear exceptions and a clean return.

Whole shop or areas

Lock everything or only URL areas, categories and product groups.

Prefilled exceptions

Login, registration, password reset, imprint, privacy and terms stay reachable.

Custom exception list

Add further paths, pages and files via URL patterns.

Return after login

Whoever opens a product page lands there after signing in, not on the home page.

Notice text

An explanatory text above the login form, in its own language per store view.

API and cron untouched

Interfaces, cron calls and payment callbacks are not redirected.

01Scope

Magento 2 force login for the whole shop or for areas

In the simplest case you lock the entire shop. It gets finer with areas: you choose URL patterns, categories or product groups that are reachable only after sign-in. A reseller area under /resellers can be locked while the rest of the shop stays public.

Search, sitemap output and product suggestions respect the lock too, so locked content does not become visible through detours. Search engines see the login page for locked areas.

  • Entire shop or chosen URL patterns
  • Categories and product groups as an area
  • Adjustable per website and store view
Stores › Configuration
Login requiredAreas
Area 1/resellers/*
Area 2Category price lists
Exception list
/customer/account/loginfree
/imprintfree
/privacyfree
/contactfree
02Exceptions

Exception list: what stays reachable without login

A login requirement must not lock out mandatory pages. Login, registration, password reset, imprint, privacy policy and terms are therefore prefilled. You add further exceptions as a path or pattern, for example a contact page, the cancellation policy or robots.txt.

Payment callbacks, webhooks, API routes and cron calls are exempt as a rule, because a redirect would disrupt payments and interfaces. For legal reasons you should keep the imprint accessible; the module does not replace legal advice.

  • Prefilled mandatory pages
  • Custom paths and patterns with wildcards
  • Technical paths (API, cron, callbacks) free automatically
03Redirect

Login page, notice text and return

Visitors are redirected with a 302, not a 301, so no permanent redirect settles in search engines or browsers. The login page carries noindex. The notice text explains why the page is protected and how to get access.

After a successful sign-in, the return leads back to the originally requested address, parameters included. The target is validated so that foreign addresses cannot be abused as a return destination.

  • 302 redirect, noindex on the login page
  • Notice text per store view
  • Return target checked against open redirects
Login page · Notice
NoticeAccess for resellers only
After loginto target page
Redirect302
Access · Groups
ResellerAccess
WholesaleAccess
GuestLogin page
04Customer groups

Login requirement by customer group and store view

The lock can be limited to individual store views, for example only the reseller store while the consumer store stays open. You can also define which customer groups have access after login. Everyone else sees a notice page with a contact option.

Interplay with the full page cache is accounted for: the check happens before protected pages are delivered, so signed-in visitors do not see cached guest pages and vice versa.

  • Lock per website and store view
  • Permitted customer groups selectable
  • Notice page for groups without access
Use cases

When Magento 2 force login makes sense

Reseller and wholesale shop

Prices and terms are not meant for the public. Magento 2 force login ensures that only registered resellers see them.

Internal staff or club shop

Merchandise or workwear for a closed group who sign in with credentials.

Early access and test phase

Before the public launch, selected customers review the shop. After launch you switch Magento 2 force login off again.

Locked price lists

Only one area, such as price lists and datasheets, is protected while the rest of the shop stays open.

Comparison

Without the module versus Magento 2 force login

CriterionWithout the moduleWith Force Login
Access to the shopPublic, prices visibleAfter sign-in, configurable per area
Mandatory pagesMust be checked one by onePrefilled exceptions
Return after loginHome pageRequested page
Notice for visitorsNoneText per store view
Technical pathsRisk of misconfigurationAPI, cron and callbacks free
MaintenanceLock individual pagesCentral rules
Setup

How we set up Magento 2 force login in your shop

1. Define areas

We clarify whether the shop or only areas are locked.

2. Check exceptions

We go through mandatory pages, payment paths and interfaces together.

3. Installation

We install the module and set notice text and target pages.

4. Test as guest and customer

Check with and without sign-in, including return, then handover.

Differences

How it differs from related Mironsoft modules

CMS Page Restriction

Locks individual CMS pages and blocks by customer group. Magento 2 force login applies to the shop, categories and URL areas instead.

Restrict Products by Customer Group

Hides individual products per group. Force Login ties access as a whole to a sign-in.

Customer Approval

Checks approval of new accounts. In combination: registration, approval, then access behind the login requirement.

05How the purchase works

No download — personal setup instead

Force Login is not offered here as a download file for self-installation. The purchase is a service commission: we install the module in your shop and define areas, exception list and notice texts together with you.

Important to know

Your purchase does not include a download link. We will get in touch with you within 2 business days — we'll sort out the details and payment together then. This offer is aimed at business owners and companies running a Magento 2 shop.

FAQ

Frequently asked questions

Everything about locking, exceptions, search engines and how the purchase works.

How can I open a Magento 2 shop to logged-in customers only?
With the module for Magento 2 force login: you switch on the login requirement, define exceptions, and visitors without sign-in are redirected to the login page.
Can I lock selected areas only with Magento 2 force login?
Yes, via URL pattern, category or product group. The rest of the shop stays public.
Do imprint and privacy policy stay reachable?
Yes, they are prefilled in the exception list. For legal reasons the imprint should always remain accessible.
What do search engines see on locked pages with Magento 2 force login?
The login page with noindex. The redirect is temporary (302), so locked content does not appear in the index.
How can I return to the requested page after login in Magento 2?
Magento 2 force login remembers the requested address and returns there after sign-in, after validating the target.
Are payments and interfaces disrupted?
No. API routes, webhooks, payment callbacks and cron calls are exempt as a rule.
Can I control the lock by customer group?
Yes. You define which groups have access after login; everyone else sees a notice page.
Does the module work with Hyvä Themes?
Yes, it is built for Hyvä and works server-side without additional JavaScript.
Can I download and install the module myself?
No. It is not a download product. After the purchase we install and configure the module personally in your shop.
Write Your Own Review
You're reviewing: Magento 2 force login – Mironsoft
loader
Loading...

You submitted your review for moderation.

This form is protected by reCAPTCHA - the Google Privacy Policy and Terms of Service apply.

Magento 2 force login – Mironsoft

Magento 2 force login – Mironsoft

€99.00