Frontend Modes & Integrations
Account adapts to any ProcessWire frontend architecture through three progressive integration stages and optional sibling module integrations.
Three Integration Stages
Section titled “Three Integration Stages”With frontendMode = 'inertia', Account automatically intercepts virtual routes under /auth/* (login, register, magic, verify, forgot, reset, mfa, oauth/{slug}, oauth/{slug}/callback) and /account/* (overview, security, sessions, notifications, saved, billing, privacy) and renders its built-in Account/AuthScreen and Account/AccountScreen Inertia pages. Zero ProcessWire pages or templates are required.
With frontendMode = 'classic', render forms inside your existing site/templates/*.php layout using $account->render() and enqueue getFrontendStyleAssets() + getFrontendScriptAssets() (dist/AccountFrontend.{js,css}):
<?php namespace ProcessWire;
$account = Account::requireInstance($wire);echo $account->render('login', ['redirect' => '/account/']);Drive authentication, profile updates, and privacy actions programmatically from custom controllers or API endpoints with typed AccountRequest and AccountResult objects:
<?php namespace ProcessWire;
use Totoglu\Account\Flow\AccountRequest;
$account = Account::requireInstance($wire);$props = $account->flowProps('login');$result = $account->handle(new AccountRequest( action: 'login',));Optional Sibling Module Integrations
Section titled “Optional Sibling Module Integrations”Sibling integrations live strictly under src/Integration/<Module>/ and activate only when the target module is installed:
Headless(/api/v1/identity/*): Exposes member authentication, profile, saved items, inbox, and session endpoints as versioned JSON APIs with JWT/PAT/Session auth.Media: EnrichesPageSavedItemResolverthumbnails and allows selecting member avatars from the shared media library whenallowLibraryis enabled.Payments: Powers/account/billingwith active subscriptions, invoices, saved payment sources, andcustomerPortalUrl()links. When a member requests a GDPRprivacy_export, payment records are included under$result->data['archive']['payments']. Whenaccount.deletedfires, active subscriptions are canceled cleanly.