Stopping free-trial abuse without punishing real signups
If you run a SaaS with a free trial, a coupon, or a signup credit, you have probably met the person who signs up eleven times. New email each time, sometimes a +tag, sometimes a throwaway domain, always the same laptop.
If you run a SaaS with a free trial, a coupon, or a signup credit, you have probably met the person who signs up eleven times. New email each time, sometimes a +tag, sometimes a throwaway domain, always the same laptop. The cost is small per account and large in total: free compute burned, referral rewards paid out to yourself, and a trial-to-paid conversion rate that quietly lies to you.
The standard defenses are all worth having: email verification, a CAPTCHA, rate limits per IP. Their shared weakness is that the attacker controls every identifier they check: the email, the IP, the username. What they find harder to rotate is the device and browser doing the signing up, and the mailbox hiding behind spelling variants ([email protected], [email protected]).
This post builds a signup check that looks at those two things and gives you three outcomes: allow, review, block. I'll use Signet, a fraud-risk API I work on, because the code below targets its real API, which has a free sandbox. The pattern works with any comparable service.
The shape of the solution
- A script tag on the signup page produces an opaque session ID for the browser.
- When the form is submitted, your server asks two questions before creating the account:
- Is this a real person's inbox? (disposable domains, alias farming, typos, throwaway mail servers)
- Has this person already claimed this trial? (same device, linked device, same mailbox under another spelling, same card)
- You act on the answer: create the account, create it but hold the trial for review, or refuse the trial.
Signet does not read what a visitor types, and it never stores the email in the clear (only a salted hash). Tell users you do device-based fraud prevention, and get consent first where the law requires it.
1. Add the tag
Create a free account at signetsentry.com/signup, no card needed, and grab your sandbox keys (pk_test_... and sk_test_...; sandbox calls use no quota).
<script async src="https://signetsentry.com/v1/tag.js" data-site-key="pk_test_..."></script>
<form data-signet action="/signup" method="post">
<input name="email" type="email" required>
<input name="password" type="password" required>
<button>Start free trial</button>
</form>
Every form[data-signet] gets a hidden signet_session_id field. If you submit with fetch, use await Signet.getSessionId() instead.
2. Check the mailbox
POST /v1/email/check takes the address and, optionally, the session of the browser that typed it:
async function signet(path, body) {
const res = await fetch(`https://signetsentry.com${path}`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SIGNET_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
signal: AbortSignal.timeout(3000),
});
if (!res.ok) throw new Error(`${path} ${res.status}`);
return res.json();
}
const mail = await signet("/v1/email/check", {
email: req.body.email,
session_id: req.body.signet_session_id,
});
// mail.recommendation: "allow" | "review" | "block"
// mail.reason_codes e.g. EMAIL_DISPOSABLE, EMAIL_ALIAS_FARMING, EMAIL_TYPO_DOMAIN,
// EMAIL_THROWAWAY_MAIL_SERVER, EMAIL_MANY_PER_DEVICE
// mail.summary: a plain-English sentence you can show to a human
Two reason codes are worth a note. EMAIL_TYPO_DOMAIN (someone typed gmial.com) should produce a "did you mean?" message, not a block: those are real customers. EMAIL_MANY_PER_DEVICE is the interesting one for trial abuse: several different addresses were typed from one browser.
3. Ask whether the trial was already claimed
Promo Guard is the second call. You name the campaign (your own label for the trial, coupon or referral reward) and pass whatever identifiers you have:
const promo = await signet("/v1/promo/check", {
campaign: "free-trial-2026",
session_id: req.body.signet_session_id,
email: req.body.email,
redeem: false, // look first; record the use once you create the account
});
// promo.eligible, promo.recommendation, promo.summary,
// promo.reason_codes: PROMO_DEVICE_REUSED, PROMO_LINKED_DEVICE_REUSED,
// PROMO_MAILBOX_REUSED, PROMO_DISPOSABLE_EMAIL, PROMO_NETWORK_BURST ...
// promo.matches shows *how* it matched: device, linked_device, mailbox, card, account
redeem: false only looks. When you actually grant the trial, call it again with redeem: true so the use is recorded for next time.
4. Put it together
app.post("/signup", async (req, res) => {
const input = { session_id: req.body.signet_session_id, email: req.body.email };
let mail, promo;
try {
[mail, promo] = await Promise.all([
signet("/v1/email/check", input),
signet("/v1/promo/check", { campaign: "free-trial-2026", ...input }),
]);
} catch (err) {
console.error("signet unavailable", err);
return createAccount(req, res, { trial: true }); // fail open, log it
}
if (mail.recommendation === "block") {
return res.status(400).send("Please use a different email address.");
}
if (promo.recommendation === "block" || !promo.eligible) {
// They can still have an account. They just don't get a second free trial.
return createAccount(req, res, { trial: false, note: promo.summary });
}
if (promo.recommendation === "review" || mail.recommendation === "review") {
return createAccount(req, res, { trial: "pending_review", note: promo.summary });
}
await signet("/v1/promo/check", { campaign: "free-trial-2026", ...input, redeem: true });
return createAccount(req, res, { trial: true });
});
The design choices matter more than the code:
- Take away the trial, not the account. A false positive then costs you one free month, not a customer. Someone who really wants the product will convert anyway; the abuser has nothing to gain from a bare account.
-
Have a middle path. Shared offices, family laptops and VPN users happen.
reviewcan mean "trial starts after you verify a phone number", a human check, or a smaller trial. - Fail open on timeout, deliberately. A signup check that can take your signup page down is worse than none. Log the miss and decide who to re-check later.
-
Don't tell the abuser why. The
summaryis for your team and logs. The user sees a friendly generic message.
5. Test every branch without a browser
Sandbox keys give fixed answers so you can exercise each path in CI:
# fixed email answers
curl -s https://signetsentry.com/v1/email/check \
-H "Authorization: Bearer $SIGNET_TEST_SECRET_KEY" -H "Content-Type: application/json" \
-d '{"email":"[email protected]"}'
# fixed promo answers: a campaign name containing "block" or "review"
curl -s https://signetsentry.com/v1/promo/check \
-H "Authorization: Bearer $SIGNET_TEST_SECRET_KEY" -H "Content-Type: application/json" \
-d '{"campaign":"trial-block","email":"[email protected]"}'
test_review@ and test_block@ addresses return fixed email results, and a promo campaign containing block or review returns that recommendation.
What this does not do
- It will not stop a determined person with a pile of separate devices, SIM cards and payment cards. That is a different economics problem; it makes the cheap, lazy, repeat version stop working.
- It is a risk signal, not proof. Keep a human path for
review. - Signet is young: the mobile SDKs are in beta, and there is no managed review team, enterprise contract or SOC 2 report yet. If you need those today, look elsewhere.
Measure it
Before you turn the check from "log only" to "enforce", run it in log-only mode for a week and compare your trial-to-paid rate for the flagged and unflagged groups. If flagged trials almost never convert, enforcing costs you nothing. If some do, loosen the thresholds before you start refusing people.
Try it
- Live demo, no account: signetsentry.com/demo
- Quick start with Node, Python, PHP and ASP.NET samples: signetsentry.com/guide/quickstart
- Free plan: 500 assessments a month, no card. Paid plans start at $49/month.
What other free-offer abuse patterns do you see that a device-plus-mailbox check would miss? I'd like to hear about them in the comments.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.