Here's the translation:
🔐 pbAuth
pbAuth – a powerful authentication, registration, and user profile management system for PageBlocks
⚙️ Features
- 🔑 Authentication and registration via POST requests
- 🔁 Password reset and change
- 👤 User profile with editable data
- 🖼️ Avatar upload
- 👥 Adding users to groups
- ✅ Validation and error display via Fenom
- 🛡️ CSRF protection and flash message support
- 🔧 Extendable controllers and templates
🚀 Quick Start
1️⃣ Enabling Routing
For pbAuth to work, routing must be enabled in PageBlocks. Ensure the system setting pageblocks_routing is set to Route Only or Full API.
2️⃣ Connecting JavaScript for Forms
If you want login and registration forms to work without page reloads, enable the pageblocks_load_scripts setting.
This will automatically load the necessary scripts to handle:
- form submission via AJAX
- error and message display
3️⃣ Adding an Authentication Chunk
It’s recommended to add one of the ready-made file chunks to your site’s header:
- 🧱 auth – a classic panel with login/registration buttons and profile display
- 🪟 auth_modal – a modal window (if you want to embed forms without separate pages)
🗺️ Route List
/login— 🔐 login form/register— 📝 user registration/forgot-password— ❓ password recovery/reset-password/{token}— ♻️ password reset/confirm-password— 🔏 password confirmation/profile— 👤 profile editing/profile/password— 🔄 password change/logout— 🚪 logout/verify-email/{token}— ✉️ email verification
💡 If you’re using the
auth_modalchunk, you don’t need to create separate pages—forms will load in a modal window.
🧩 Authentication Element Structure
📁 Controllers —
/core/App/Http/Controllers/Auth/
Core logic: registration, login, password recovery, etc.🧾 Templates —
/core/App/elements/auth/
Fenom templates for forms and notifications. Highly customizable.🌍 Lexicons (translations) —
/core/App/lang/
Messages and errors in different languages.🛣️ Routes —
/core/App/routes/auth.php
Define URLs and corresponding controllers.