Skip to content

// auth and identity

Via API

Kinde email verification with pingutil

Kinde's user:pre_registration trigger fires after first-factor sign-in but before a user record exists, which makes it the place to stop throwaway accounts. A workflow that calls pingutil through kinde.fetch can deny randomized and disposable addresses with a message on the Kinde form, on any plan, with a list you do not have to maintain.

Where it connects: Kinde workflow on the user:pre_registration trigger, using kinde.fetch and denyAccess

What goes wrong without it

  • Our Kinde user list keeps growing with accounts at temp-mail domains that never come back after the trial.
  • Kinde's disposable tutorial wants us to keep our own list of domains in an environment variable, and that list goes stale.
  • Bots register random strings at real-looking domains, and no domain list catches those.

What you can do with Kinde and pingutil

  • Deny disposable addresses at pre-registration

    The workflow reads event.context.user.email, calls GET /v1/lookup with skip_enrichment=true and calls denyAccess when verdict.reason is disposable_domain. Kinde shows the message and no user record is created.

  • Stop randomized local parts

    verdict.reason randomized_local_part flags machine-generated addresses on any domain. The same denyAccess call stops them.

  • Add to Kinde's built-in block

    On plans that include Kinde's Block disposable email addresses setting, keep it on. Kinde applies it before the workflow runs, and pingutil adds the randomness check and a list re-synced weekly.

Set it up

  1. 1

    Create a pingutil API key in the pingutil dashboard and add it in Kinde under Settings > Data management > Env variables as PINGUTIL_KEY, marked as a secret.

  2. 2

    Connect a workflow Git repository to Kinde (Kinde's workflow quick start guide covers this) and install @kinde/infrastructure.

  3. 3

    Add the file below, named so it ends in Workflow, with the kinde.env, kinde.auth, kinde.fetch and url bindings.

  4. 4

    Push the commit and sync the workflow in the Kinde admin area. Each trigger takes one workflow, so merge this check into any existing pre-registration workflow.

  5. 5

    Register with a disposable address and confirm the deny message, then check the workflow runtime logs.

preRegistrationWorkflow.ts
import {
  onUserPreRegistrationEvent,
  WorkflowSettings,
  denyAccess,
  fetch,
  getEnvironmentVariable,
} from '@kinde/infrastructure';

export const workflowSettings: WorkflowSettings = {
  id: 'pingutilPreRegistration',
  name: 'Check sign-up email with pingutil',
  // If the workflow itself fails (fetch timeout, exception), let sign-up continue.
  failurePolicy: { action: 'continue' },
  trigger: 'user:pre_registration',
  bindings: {
    'kinde.env': {},
    'kinde.auth': {}, // required for denyAccess
    'kinde.fetch': {},
    url: {}, // used by fetch under the hood
  },
};

export default async function Workflow(event: onUserPreRegistrationEvent) {
  const email = event.context.user?.email;
  const key = getEnvironmentVariable('PINGUTIL_KEY')?.value;
  if (!email || !key) return;

  let data;
  try {
    const res = await fetch(
      'https://pingutil.com/v1/lookup?skip_enrichment=true&input=' + encodeURIComponent(email),
      {
        method: 'GET',
        responseFormat: 'json',
        headers: { authorization: 'Bearer ' + key },
      },
    );
    data = res.data;
  } catch (err) {
    console.log('pingutil unavailable, allowing registration');
    return;
  }

  // Error bodies (429 quota_exceeded, 5xx) have no verdict: fail open.
  if (data?.verdict?.is_spam) {
    denyAccess('Please sign up with a permanent email address.');
  }
}

What to do with each result

pingutil resultAction in Kinde
verdict.is_spam: true, reason "disposable_domain"denyAccess with a message asking for a permanent address
verdict.is_spam: true, reason "randomized_local_part"denyAccess; no user record is created
verdict.low_trust: trueAllow; log the reason and review role or sales sign-ups later
category: "company"Allow; use it later to route work-email users
Error body or failed fetchReturn without denyAccess (fail open)

Limits to plan for

  • Kinde's workflow docs do not state an execution time limit, so this uses fast-mode /v1/lookup, which answers in milliseconds. A full mailbox check with /v1/verify can take several seconds while the user waits.
  • user:pre_registration fires after first-factor sign-in (for example email and password, or Google) and before the user record is created. Users added through the Kinde Management API or imports do not pass through it.
  • Each registration counts toward 2,000 lookups a day (30,000 a month) per account. Those are Free plan limits; Enterprise has custom limits.

Kinde documentation

Kinde is a trademark of its owner. This integration uses Kinde's documented extension points; it is not an official Kinde app.

Common questions

Kinde already blocks disposable emails. Why add pingutil?
Kinde's built-in setting is available on the Plus plan and above and uses a list Kinde maintains. pingutil works on any Kinde plan from a workflow and also flags randomized local parts on domains that are on no list.
Should I use kinde.secureFetch instead of kinde.fetch?
Kinde recommends secureFetch when the POST body carries sensitive data, because it encrypts the body. The example sends the address as a query parameter on a GET over HTTPS; switch to secureFetch with a POST body if your policy requires the encrypted channel.

Stop bad addresses in Kinde today

Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your Kinde setup will receive.