Environment Variables Reference

February 22, 2026 · View on GitHub

All env variables are optional. The default value is used when the variable is not set. Set them in your .env file or server environment.


General

VariableDefaultDescription
VERIFICATION_ENABLEDtrueMaster toggle. Set to false to disable all verification globally.
VERIFICATION_REQUIRED_SETUP_STEPS(see config)Comma-separated list of steps to run, e.g. emailVerify,totp. Overrides the requiredSetupSteps array in config/verification.php.
VERIFICATION_OTP_LENGTH6Number of digits for all OTP codes (email OTP and SMS OTP).

Routing

Routes default to UsersController. Override only if your controller or prefix differs.

VariableDefaultDescription
VERIFICATION_ROUTE_CONTROLLERUsersController for the verify action
VERIFICATION_ROUTE_ACTIONverifyAction name for OTP verification
VERIFICATION_ROUTE_PREFIX(none)Routing prefix for the verify route
VERIFICATION_PENDING_CONTROLLERUsersController for the pending (check inbox) page
VERIFICATION_PENDING_ACTIONpendingAction name for the pending page
VERIFICATION_PENDING_PREFIX(none)Routing prefix for the pending route
VERIFICATION_VERIFIED_CONTROLLERUsersController to redirect to after all steps are complete
VERIFICATION_VERIFIED_ACTIONindexAction to redirect to after all steps are complete
VERIFICATION_VERIFIED_PREFIX(none)Routing prefix for the post-verification redirect
VERIFICATION_ENROLL_CONTROLLERUsersController for TOTP enrollment
VERIFICATION_ENROLL_ACTIONenrollAction name for TOTP enrollment
VERIFICATION_ENROLL_PREFIX(none)Routing prefix for the enroll route
VERIFICATION_ENROLL_PHONE_CONTROLLERUsersController for phone number enrollment
VERIFICATION_ENROLL_PHONE_ACTIONenrollPhoneAction name for phone enrollment
VERIFICATION_ENROLL_PHONE_PREFIX(none)Routing prefix for the enroll-phone route
VERIFICATION_CHOOSE_CONTROLLERUsersController for OTP method selection
VERIFICATION_CHOOSE_ACTIONchooseVerificationAction name for OTP method selection
VERIFICATION_CHOOSE_PREFIX(none)Routing prefix for the choose-verification route

Storage & Rate Limiting

VariableDefaultDescription
VERIFICATION_CACHE_CONFIGverificationCakePHP cache configuration name used to store OTP codes and rate-limit state
VERIFICATION_MAX_ATTEMPTS5Maximum failed code attempts before lockout
VERIFICATION_LOCKOUT900Lockout duration in seconds after too many failed attempts (900 = 15 min)
VERIFICATION_RESEND_COOLDOWN60Minimum seconds between OTP resend requests. Set to 0 to disable
VERIFICATION_OTP_BURST0Maximum OTP codes that can be issued within the burst period. 0 = unlimited
VERIFICATION_OTP_PERIOD0Burst window in seconds. 0 = disabled

Encryption (TOTP secret at rest)

VariableDefaultDescription
VERIFICATION_CRYPTO_DRIVERaes-gcmEncryption driver: aes-gcm or sodium
VERIFICATION_CRYPTO_KEY(empty)Base64-encoded 32-byte encryption key. Required when TOTP is enabled. Generate with: php -r "echo base64_encode(random_bytes(32)), PHP_EOL;"

If VERIFICATION_CRYPTO_KEY is empty, the TOTP secret is stored unencrypted. Always set this in production.


Identity

VariableDefaultDescription
VERIFICATION_ID_FIELDidIdentity field used as the key for OTP cache entries

Database column mapping

Override only when your users table uses different column names than the defaults.

VariableDefault columnDescription
VERIFICATION_DB_COL_EMAILemailEmail address column
VERIFICATION_DB_COL_PHONEphonePhone number column
VERIFICATION_DB_COL_TOTP_SECRETtotp_secretTOTP secret column
VERIFICATION_DB_COL_EMAIL_VERIFIED_ATemail_verified_atTimestamp set when email is confirmed
VERIFICATION_DB_COL_PHONE_VERIFIED_ATphone_verified_atTimestamp set after successful SMS OTP
VERIFICATION_DB_COL_TOTP_VERIFIED_ATtotp_verified_atTimestamp set after first successful TOTP
VERIFICATION_DB_COL_PHONE_VERIFIEDphone_verifiedBoolean flag for phone verification (optional)
VERIFICATION_DB_COL_PREFSverification_preferencesJSON column for storing the user's chosen OTP driver
VERIFICATION_EMAIL_FIELDemailEmail field read by emailVerify and emailOtp drivers
VERIFICATION_PHONE_FIELDphonePhone field read by smsOtp driver

Email Verify driver

VariableDefaultDescription
VERIFICATION_EMAIL_VERIFY_ENABLEDtrueEnable or disable the emailVerify step

Email OTP driver

VariableDefaultDescription
VERIFICATION_EMAIL_OTP_ENABLEDtrueEnable or disable the emailOtp step
VERIFICATION_EMAIL_TTL600OTP code validity in seconds (600 = 10 min)

SMS OTP driver

VariableDefaultDescription
VERIFICATION_SMS_OTP_ENABLEDtrueEnable or disable the smsOtp step
VERIFICATION_SMS_TTL300OTP code validity in seconds (300 = 5 min)
VERIFICATION_SMS_MESSAGEYour verification code is {code}. It expires in {ttl} minutes.SMS message template. {code} and {ttl} are replaced at send time
VERIFICATION_SMS_SENDERYourAppSender ID or phone number shown to the recipient
VERIFICATION_SMS_E164falseNormalize phone numbers to E.164 format before sending
VERIFICATION_SMS_COUNTRY_CODE(empty)Default country code used for E.164 normalization (e.g. BA, DE)
VERIFICATION_SMS_TRANSPORTdefaultName of the SMS transport to use (must be defined under sms.transports)

TOTP driver

VariableDefaultDescription
VERIFICATION_TOTP_ENABLEDtrueEnable or disable the totp step
VERIFICATION_TOTP_DIGITS6Number of digits in the TOTP code (6 or 8)
VERIFICATION_TOTP_PERIOD30TOTP window in seconds (standard: 30)
VERIFICATION_TOTP_ALGOsha1HMAC algorithm: sha1, sha256, or sha512
VERIFICATION_TOTP_DRIFT1Allowed clock drift in windows (±1 = ±30 s with default period)

Example .env

# General
VERIFICATION_ENABLED=true
VERIFICATION_REQUIRED_SETUP_STEPS=emailVerify,totp
VERIFICATION_OTP_LENGTH=6

# Encryption (required for TOTP in production)
VERIFICATION_CRYPTO_DRIVER=aes-gcm
VERIFICATION_CRYPTO_KEY=<base64-encoded-32-byte-key>

# Storage
VERIFICATION_CACHE_CONFIG=verification
VERIFICATION_MAX_ATTEMPTS=5
VERIFICATION_LOCKOUT=900
VERIFICATION_RESEND_COOLDOWN=60

# SMS (if smsOtp is used)
VERIFICATION_SMS_OTP_ENABLED=true
VERIFICATION_SMS_TTL=300
VERIFICATION_SMS_TRANSPORT=twilio
VERIFICATION_SMS_SENDER=MyApp
VERIFICATION_SMS_E164=true
VERIFICATION_SMS_COUNTRY_CODE=BA

Documentation

TopicFile
README../README.md
Verification flows (setup, login, OTP choice)verification_flow.md
Installationinstallation.md
Configuration referenceconfiguration.md
Environment variablesenv.md
UsersController actionsusers_controller.md
VerificationComponentverification_component.md
VerificationHelperverification_helper.md
Email verification & Email OTPemail_verification.md
SMS OTPsms_verification.md
TOTPtotp_verification.md
Enable / disable individual stepsverificator_enable_disable.md
API referenceapi/index.md