Extension Points
Beyond PSR-14 events, the extension provides several extension points.
Overriding Fluid templates
All frontend output is rendered via Fluid templates located in
EXT:. Override any template by
registering a higher-priority path:
plugin.tx_nrpasskeysfe {
view {
templateRootPaths.10 = EXT:my_ext/Resources/Private/Templates/NrPasskeysFe/
partialRootPaths.10 = EXT:my_ext/Resources/Private/Partials/NrPasskeysFe/
layoutRootPaths.10 = EXT:my_ext/Resources/Private/Layouts/NrPasskeysFe/
}
}
Available templates:
Login/-- Passkey login form, with the recovery code formIndex. html Enrollment/-- Passkey enrollment form, with its success messageIndex. html Management/-- Self-service management panel, registration and recovery codesIndex. html Felogin/andLogin/ Login. html Felogin/-- the felogin template overrideLogin/ Logout. html AdminandModule/ Dashboard. html Admin-- backend moduleModule/ Help. html
Available partials:
Nr-- CSS, scripts and JavaScript translations of the passkey login, rendered byPasskeys Fe/ Login Assets. html Login/and by the felogin overrideIndex. html
Replacing services
All services are registered in Configuration/ with
standard Symfony DI. To replace a service, add an alias in your
extension's Services.:
# Override the enforcement service
Netresearch\NrPasskeysFe\Service\FrontendEnforcementService:
class: MyVendor\MyExt\Service\CustomEnforcementService
Custom enforcement via event
The recommended approach for custom enforcement logic is to listen to
Enforcement and call set:
use Netresearch\NrPasskeysFe\Event\EnforcementLevelResolvedEvent;
final class CustomEnforcementListener
{
public function __invoke(EnforcementLevelResolvedEvent $event): void
{
// Exempt staff members from enforcement
if ($this->isStaffMember($event->feUserUid)) {
$event->setEffectiveLevel('off');
}
}
}
Adding custom eID endpoints
The extension's eID dispatcher (Eid) is registered at
e. It routes requests to controllers based on
the action POST parameter.
To add custom eID actions without modifying the extension, listen to
Before for pre-auth hooks, or register
your own eID handler in ext_:
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['my_passkey_ext']
= \MyVendor\MyExt\Eid\MyEidHandler::class . '::handle';
JavaScript module overrides
The extension's JavaScript modules are loaded as TYPO3 ES modules
(@netresearch/). To customize behavior, extend the
module via @typo3/ hooks or override the
import map in Configuration/.
Note
Overriding JavaScript modules is an advanced technique. Prefer CSS overrides and template overrides for UI customization.