grimpirate/halberd

CodeIgniter4 Google Two-Factor Authentication Module for Shield

dev-develop 2025-06-06 22:45 UTC

This package is auto-updated.

Last update: 2025-06-06 22:45:45 UTC


README

A TOTP (Time-Based One-Time Password) Two-Factor Authentication Module for codeigniter4/shield

Installation

Project should have a stability level of dev

composer config minimum-stability dev
composer config prefer-stable true
composer require grimpirate/halberd:dev-develop

Configuration - CLI method

php spark halberd:ini

The initialization will silently fail to copy any of the files listed in the Configuration - Manual method section if they are already present in the app/Config/ directory

Configuration - Manual method

  1. Copy the configuration file from vendor/grimpirate/halberd/app/Config/TOTP.php to your project's app/Config/ directory
  2. Copy/merge the registrar file from vendor/grimpirate/halberd/app/Config/Registrar.php to your project's app/Config/ directory
  3. Copy the stylesheet from vendor/grimpirate/halberd/public/css/totp.css to your project's app/public/css/ directory

Dependencies

The dependency pragmarx/google2fa requires that your server time be accurately synchronized (via NTP or some other means). CodeIgniter's appTimezone will not affect OTP generation.