mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 04:19:00 +03:00
cluster0: auth-email bearer + shorten verify URLs in outbound mail
ShortLinksRepository::shortenForOutbound; ensure-auth-email-bearer.sh; verify-mail-lab sends shortened s.f0xx.org link in verify email body. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,16 +16,19 @@ COMPOSED="${COMPOSE_BACKEND:-/var/www/ac/composed/backend}"
|
||||
export MAIL_TEST_TO="$TO"
|
||||
PHP="${PHP_BIN:-php83}"
|
||||
command -v "$PHP" >/dev/null 2>&1 || PHP=php
|
||||
_origin="${LAB_PUBLIC_ORIGIN:-https://acl0.f0xx.org}"
|
||||
_token="lab-smoke-$(date +%s)"
|
||||
_long="${_origin%/}/app/androidcast_project/issues/verify-email?token=${_token}"
|
||||
export MAIL_TEST_LONG="$_long"
|
||||
_out="$("$PHP" -r '
|
||||
require "'"${COMPOSED}"'/src/bootstrap.php";
|
||||
$to = getenv("MAIL_TEST_TO") ?: "";
|
||||
$origin = rtrim((string) cfg("public_origin", "https://acl0.f0xx.org"), "/");
|
||||
$base = rtrim((string) cfg("base_path", ""), "/");
|
||||
$ok = AuthMailer::sendVerifyEmail($to, $origin . $base . "/verify-email?token=lab-smoke");
|
||||
$long = getenv("MAIL_TEST_LONG") ?: "";
|
||||
$ok = AuthMailer::sendVerifyEmail($to, $long);
|
||||
echo $ok ? "mail_ok" : "mail_fail";
|
||||
' 2>&1)" || _out="mail_fail"
|
||||
|
||||
log "$_out to=$TO"
|
||||
log "$_out to=$TO long=$_long"
|
||||
case "$_out" in
|
||||
mail_ok) exit 0 ;;
|
||||
*) exit 1 ;;
|
||||
|
||||
Reference in New Issue
Block a user