Sign-up code guard: honeypot, form age, per-IP + global limits, progressive icon check, burst alert
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -1610,8 +1610,9 @@
|
||||
if (!cfg.emailAuth) return;
|
||||
$('passCards').hidden = true;
|
||||
$('magicCard').hidden = false;
|
||||
const codeOpts = () => ({ honeypot: $('mcWebsite'), host: $('mcCheck') });
|
||||
const start = busy($('mcSendBtn'), async () => {
|
||||
const r = await api('/api/auth/email/start', { email: $('mcEmail').value });
|
||||
const r = await IAP.requestCode($('mcEmail').value, codeOpts());
|
||||
$('mcCodeRow').hidden = false;
|
||||
$('mcVerifyBtn').hidden = false;
|
||||
$('mcSendBtn').hidden = true;
|
||||
@@ -1622,7 +1623,7 @@
|
||||
});
|
||||
$('mcSendBtn').addEventListener('click', start);
|
||||
$('mcResend').addEventListener('click', busy($('mcResend'), async () => {
|
||||
const r = await api('/api/auth/email/start', { email: $('mcEmail').value });
|
||||
const r = await IAP.requestCode($('mcEmail').value, codeOpts());
|
||||
if (r.devCode) $('mcCode').value = r.devCode;
|
||||
IAP.status('Fresh code sent.', 'ok');
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user