RecoveryCodeService.php
Recovery Code Service.
Generates and verifies one-time account recovery codes for users who registered without an email (their only password-recovery channel).
A code is high-entropy random, shown to the user once, and stored only as a SHA-256 hash (same model as the email reset token). Display is grouped with dashes for readability; verification canonicalises input (uppercase, non-alphanumerics stripped) so the user can type it with or without the dashes or in any case.
PHP version 8.1
Tags
Table of Contents
Classes
- RecoveryCodeService
- Generates and verifies one-time recovery codes.