Stop abuse at sign-up, prove a phone or mailbox, and limit login attempts on one key.
coss.risk.assess() + coss.verify.start()
const { : } = await ..({
: "signup",
: { : . },
: .,
: .,
: { : . },
});
// The fraud guard runs before anything is sent.
await ..({ : ., : . });
const { : } = await ..({
: .,
: .,
});ada@example.com
+1 415 555 0123
- coss.risk.assess()decision: allow
- coss.verify.start()status: pending
- verification.approved
Decide at the door
An assessment combines email, IP, device and content signals into allow, review or block, with its reasons.
See howcoss.risk.assess()event: signup
| Reasons | Decision | |
|---|---|---|
| ada@example.com | none | |
| team@example.org | email.role_account | |
| x7@example.net | email.disposable, ip.tor |
Codes you never handle
coss.com keeps only a keyed hash, and a fraud guard runs before anything is sent or billed.
See howcoss.verify.check()
482913
Code lifetime10 minutes by default
Wrong code that fails itthe fifth
coss.risk.limit()bucket: login
| Attempt | Key | Allowed |
|---|---|---|
| 1 | ada@example.com | true |
| 2 | ada@example.com | true |
| 3 | ada@example.com | false |
Limits for your endpoints
Protect login, sign-up and password reset with the limiter coss.com runs on itself.
See howcoss/better-authcategory: "account"
Verify your emaildelivered
Reset your passworddelivered
Your sign-in linkdelivered
You're invitedsent
Account emails, drop-in
The Better Auth integration covers verification, resets, magic links and invitations, with tracking off.
Read the docsPricing and limits
Verify is billed per approved verification, plus the SMS that carried the code.
PricingSee all plans
Verifications
$0.05per verification
Limits
- Code length
- 6 digits by default
- Code lifetime
- 10 minutes by default
- Wrong code that fails it
- the fifth
- Resends per pending verification
- 5
- Assessment decisions
- allow, review, block
- Assessments per API key
- 100 per second, bursts of 200
- Rate limit buckets per environment
- 100
- Rate limit checks per API key
- 500 per second, bursts of 1,000
Questions
Install coss and pass the callbacks of cossEmail() from coss/better-auth to Better Auth. It sends verification, password reset, magic link, one-time code and invitation emails with default templates you can replace one by one.
Yes. coss/authjs is an Auth.js email provider that sends magic sign-in links through coss.com. Add it to your providers with your sender address and set COSS_API_KEY.
Click tracking would send secret links, such as password reset links, through a redirect, and an open pixel adds nothing to a sign-in email. The integrations send with category account and tracking off.
Call coss.verify.start() with the number in E.164 form and the user's IP address, then coss.verify.check() with the code they typed. coss.com makes the code, sends it, keeps only a keyed hash of it, counts attempts and expires it.
Verify's fraud guard checks every new verification before a code is sent. Premium-rate numbers, Tor exit nodes, entries on your Risk block list and bursts to one number prefix are blocked, and a blocked verification is neither sent nor billed.
Yes. Define a bucket with coss.risk.limitBuckets.create() and check a key, such as an email address or IP address, with coss.risk.limit() on every request. It uses the same GCRA limiter as coss.com's own API.
The products
One key, one SDK, one log for all of them.
Build it this afternoon.
Development keys record every request and event and deliver nothing.