mirror of
git://f0xx.org/ac/ac-ms-identity
synced 2026-07-30 04:17:52 +03:00
auth: shorten verify-email URLs via url shortener before send
Outbound registration mail uses ShortLinksRepository::shortenForOutbound (s.f0xx.org) with 24h TTL; falls back to long URL if shortener unavailable. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,7 +18,10 @@ final class AuthMailer {
|
|||||||
|
|
||||||
public static function sendVerifyEmail(string $to, string $verifyUrl): bool {
|
public static function sendVerifyEmail(string $to, string $verifyUrl): bool {
|
||||||
$subject = 'Verify your Android Cast account';
|
$subject = 'Verify your Android Cast account';
|
||||||
$body = "Open this link to verify your email (valid 24h):\n\n" . $verifyUrl . "\n";
|
$link = class_exists('ShortLinksRepository', false)
|
||||||
|
? ShortLinksRepository::shortenForOutbound($verifyUrl, 86400)
|
||||||
|
: $verifyUrl;
|
||||||
|
$body = "Open this link to verify your email (valid 24h):\n\n" . $link . "\n";
|
||||||
return self::send($to, $subject, $body);
|
return self::send($to, $subject, $body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user