Search by

hryvinskyi / magento2-customer-sign-in-privacy-consent

hryvinskyi

Bridge of the customer sign-in suite and the privacy consents: the consents page of My Account stays open for a customer who owes a second sign-in step.

Package info

github.com/hryvinskyi/magento2-customer-sign-in-privacy-consent

Type:magento2-module

pkg:composer/hryvinskyi/magento2-customer-sign-in-privacy-consent

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-12-03 08:36 UTC

This package is auto-updated.

Last update: 2026-12-03 14:17:58 UTC


README

The bridge between the customer sign-in suite and the privacy consent suite. A store can require a second sign-in step from the customers of chosen groups, and the sign-in suite's storefront package sends a customer who owes one to Sign-in & Security from every page of My Account that asks the customer session to authenticate them, until they set it up. The privacy consents page of My Account asks it. This package keeps that page open, so a customer can always withdraw a consent as easily as they gave it. It adds no page, setting or table.

What it does for a store

  • The consents page stays open. A signed-in customer who owes a second step opens the privacy consents page of My Account and sees their consents, as every other customer does.
  • Withdrawing a consent stays open. The same customer withdraws a consent from that page, and the withdrawal is recorded as for any customer.
  • Every other page is held back as the sign-in suite does it. The other pages of My Account that ask the customer session still send the customer to Sign-in & Security.

Who owes a second step, and the settings that decide it, are described in the README of hryvinskyi/magento2-customer-sign-in; the consents page is described in the README of hryvinskyi/magento2-privacy-consent-frontend.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.x. The suites are built and tested on 2.4.9.
  • PHP 8.1 to 8.5.
  • hryvinskyi/magento2-customer-sign-in-frontend ^1.0 and hryvinskyi/magento2-privacy-consent-frontend ^1.0, which bring the rest of both suites they need.

Installation

Run from the Magento root. Neither the customer sign-in pack nor the privacy consent pack includes this package: a store that runs both suites installs it by name.

composer require hryvinskyi/magento2-customer-sign-in-privacy-consent
bin/magento module:enable Hryvinskyi_Clock Hryvinskyi_RateLimit Hryvinskyi_VerificationCode Hryvinskyi_CustomerSignInApi Hryvinskyi_CustomerSignIn Hryvinskyi_CustomerSignInFrontend Hryvinskyi_PrivacyConsentApi Hryvinskyi_ClientAddress Hryvinskyi_PrivacyConsent Hryvinskyi_Base Hryvinskyi_HeadTagManager Hryvinskyi_ThemeAssets Hryvinskyi_PrivacyConsentFrontend Hryvinskyi_CustomerSignInPrivacyConsent
bin/magento setup:upgrade
bin/magento setup:di:compile  # production mode only
bin/magento cache:flush

Verify: bin/magento module:status Hryvinskyi_CustomerSignInPrivacyConsent prints Hryvinskyi_CustomerSignInPrivacyConsent : Module is enabled.

Configuration

None of its own. It has an effect only while the store requires a second step (Stores > Settings > Configuration > Customers > Sign-in Methods > General, Require a Second Step).

Stored data

None.

Registrations

Where What
Argument openRequests of Hryvinskyi\CustomerSignInFrontend\Model\SecondStepSetUpGate (etc/frontend/di.xml) Item privacy_consents: privacyconsent_consents, the route and controller of the consents page (privacyconsent/consents/index) and of the withdrawal (privacyconsent/consents/withdraw).

The package registers no route, plugin, table, setting, ACL resource, cron job or command.

Versioning

The package follows Semantic Versioning. What changed in each version is in CHANGELOG.md.

Tests

Run from the Magento root.

  • Integration: the platform's harness in dev/tests/integration, one run at a time against its own database. cd dev/tests/integration && php -d memory_limit=4G ../../../vendor/bin/phpunit -c phpunit.xml ../../../app/code/Hryvinskyi/CustomerSignInPrivacyConsent/Test/Integration. The tests use the test fixtures of hryvinskyi/magento2-customer-sign-in-frontend and hryvinskyi/magento2-privacy-consent-frontend, and need the platform's Customer and Store modules.
  • Static analysis: PHPStan 2.x at level 10 with the package's phpstan.neon.dist (phpstan analyse -c app/code/Hryvinskyi/CustomerSignInPrivacyConsent/phpstan.neon.dist --level=10), and vendor/bin/phpcs --standard=app/code/Hryvinskyi/CustomerSignInPrivacyConsent/phpcs.xml.dist app/code/Hryvinskyi/CustomerSignInPrivacyConsent.