1
0
mirror of git://f0xx.org/ac/ac-ms-identity synced 2026-07-30 03:38:12 +03:00

feat(identity): verify email TTL, resend API, mail TTL label

Signed-off-by: Anton Afanasyeu <a.afanasieff@gmail.com>
This commit is contained in:
Anton Afanasyeu
2026-07-12 13:53:15 +02:00
parent 40f969562f
commit 691c9322cb
3 changed files with 144 additions and 14 deletions

View File

@@ -19,6 +19,19 @@ if ($action === 'verify') {
json_out($result, $result['ok'] ? 200 : 400);
}
if ($action === 'resend') {
$result = AuthRegistration::resendVerification((string) ($data['email'] ?? ''));
json_out($result, $result['ok'] ? 200 : 400);
}
if ($action === 'pending') {
$pending = AuthRegistration::pendingVerification((string) ($data['email'] ?? ''));
if ($pending === null) {
json_out(['ok' => false, 'error' => 'not_pending'], 404);
}
json_out($pending, ($pending['ok'] ?? false) ? 200 : 410);
}
$email = (string) ($data['email'] ?? '');
$password = (string) ($data['password'] ?? '');
$username = (string) ($data['username'] ?? '');