Make the magic-link resend cooldown configurable
EmailVerifier::RESEND_INTERVAL_SECONDS was a hardcoded class constant shared (via a copy-of-a-constant) by AuthController and EmailVerificationController. It's now a constructor param (resendIntervalSeconds, default 60, same as before) sourced from Config -- new MAGIC_LINK_RESEND_SECONDS env var, default unchanged. Docker Compose sets it to 0, so magic links resend immediately during local development instead of waiting out the throttle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ $session = new SessionPayload($jwt, $verificationTokens, $passkeys);
|
||||
$mailer = $config->mail->transport === 'log'
|
||||
? new LogMailer($config->mail->logPath)
|
||||
: new PhpMailerMailer($config->mail);
|
||||
$verifier = new EmailVerifier($verificationTokens, $users, $mailer, $config->appUrl);
|
||||
$verifier = new EmailVerifier($verificationTokens, $users, $mailer, $config->appUrl, $config->resendIntervalSeconds);
|
||||
|
||||
// 'none' attestation: verify the credential is a legitimate WebAuthn response
|
||||
// without checking authenticator provenance against a root CA -- the usual
|
||||
|
||||
Reference in New Issue
Block a user