npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

better-auth-vetto

v0.2.1

Published

Better Auth plugin: block disposable sign-up emails offline (CC0 list), let privacy relays through, optional dead-domain (MX) check, and a Gmail canonical-email helper.

Readme

better-auth-vetto

A Better Auth plugin that rejects disposable sign-up emails without any API call, and doesn't punish privacy-conscious users.

  • Offline blocklist: ~9,900 disposable domains from the CC0 disposable-email-domains project, bundled. Subdomains match too (x.mailinator.com).
  • Privacy relays allowed: Apple Hide My Email, DuckDuckGo, Firefox Relay, SimpleLogin, Proton Pass, addy.io and 33mail forward to an inbox the user reads, so they're let through even if you add a bigger blocklist. Some popular lists block them; see the audit.
  • Dead domains (optional): checkMx: true rejects domains that can't receive mail (NXDOMAIN, null MX, or no MX and no A/AAAA). DNS errors and timeouts let the signup through.
  • Gmail alias key: canonicalEmail() folds [email protected] to [email protected], so you can store a uniqueness key. Dots are only stripped for Gmail.

Step-by-step guide with the full setup: Block disposable emails in Better Auth.

Install

npm install better-auth-vetto
import { betterAuth } from 'better-auth';
import { vetto } from 'better-auth-vetto';

export const auth = betterAuth({
  emailAndPassword: { enabled: true },
  plugins: [
    vetto({
      checkMx: true, // Node runtimes only; skipped where node:dns isn't available
      allow: ['partner-company.com'],
      block: ['some-new-throwaway.com'],
    }),
  ],
});

A blocked request gets a 400 with a message you can show next to the email field.

Options

| Option | Default | | |---|---|---| | allow | [] | Domains always accepted (checked first). | | block | [] | Extra domains to reject. | | allowRelays | true | Let privacy relays through. | | checkMx | false | Reject domains that can't receive mail. Fails open. | | mxTimeoutMs | 1500 | DNS timeout for checkMx. | | paths | sign-up, change-email, magic-link, email-otp send | Endpoints the check runs on. | | message | "Please use a permanent email address…" | Error for disposable domains. | | deadMessage | "This email domain cannot receive mail…" | Error for dead domains. |

Helpers, usable without the plugin: checkEmail(email, options) → 'ok' | 'disposable' | 'dead', canonicalEmail(email), emailDomain(email), domainAcceptsMail(domain).

What it doesn't do

  • It doesn't catch typos ([email protected]), the same person's 7th Gmail alias across accounts (store canonicalEmail() with a unique index for that), bots or signup bursts. Those need the form and a shared history, which is what the hosted Vetto script does. This plugin works on its own and doesn't depend on it.
  • A list is never complete. Add domains you see with block, and update the package to get the latest list.

Update the list

npm run update-domains

License

MIT. The bundled domain list is CC0 1.0, from disposable-email-domains.