Skip to content

🔐 pbAuth ​

pbAuth is login, registration, password recovery and a user profile for sites built on PageBlocks 3.x. It sits on top of MODX accounts: the component neither creates a user table of its own nor replaces modUser.

📖 The documentation for pbAuth is on its own site

  • pbauth.pageblocks.pro — installation, templates, the settings file, social sign-in, two-factor, the reference.
  • 🎬 Demo — the forms in a live site.

This page answers one question only: do I need this component. How to use it is written there, and only there — so that the two can never disagree.

⚙️ What it does ​

  • 🔑 Registration with email confirmation, and resending the link
  • 🚪 Sign-in by username, email or phone
  • 🔁 Password recovery, password change, and password confirmation before a dangerous action
  • 👤 A profile with editable fields and an avatar
  • 🌐 Sign-in through six social networks — Google, Yandex, Mail.ru, Telegram, GitHub, Facebook
  • 🔢 Two-factor sign-in by one-time code, with backup codes
  • 🕵️ Impersonation — a manager signs in as a user and back out again
  • 👥 Putting users into groups on registration
  • 🚦 A "one session per account" mode
  • ✅ Validation, error display and flash messages through Fenom, with CSRF protection

🧩 What is yours and what is the component's ​

This is the part worth knowing before you buy, because it decides whether your work survives an update.

The markup is yours. Twenty form chunks and the wrapper templates are copied into core/App/elements/auth/ at install time, and from that moment they belong to the site. Neither an update nor an uninstall touches a file you have edited. The settings file core/App/config/pbauth.php works the same way. The other side of the same fact: fixes to the shipped markup do not reach a file you have edited either — an update names it in the log, and reconciling it is done by hand.

The code is the component's. Controllers and routes live inside core/components/pbauth/ and are updated along with it. Behavior — templates, validation rules, redirects, groups, even replacing a controller — is changed through the settings file, not by editing code in place.

Routing has to be on

The pageblocks_routing setting must be Route Only or Full API. On the default value /login and /register answer "page not found", and it looks exactly as though the package failed to install.

© PageBlocks 2019-present