Sign-up and auth

Supabase integration

An Edge Function answers Supabase Auth’s Before User Created hook: it looks up each new address with our API and tells Supabase to refuse the user when the result is one you stop, by default invalid and disposable. The person is told why, and when our API is slow or down the user is created anyway.

Read the full setup guideGet an API key

  • Setup guide
  • One TypeScript file with no dependencies

email-validation-signupSupabase CLI

Terminal
supabase functions deploy email-validation-signup --no-verify-jwt
supabase secrets set EV_API_KEY=your-api-key
supabase secrets set BEFORE_USER_CREATED_HOOK_SECRET='v1,whsec_...'

At a glance.

Status
Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
For
Projects on Supabase Auth that want sign-ups, invitations and OAuth or single sign-on users with a dead or throwaway address refused at the moment Supabase is about to create them.
You need
A Supabase project you deploy to with the Supabase CLI, access to Authentication, Hooks in its dashboard, and an API key made for it, with a daily credit cap.
Costs
1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
Full guide
Read the full setup guide

Typical uses.

  • Catch mistyped and dead addresses

    When an address cannot receive email, Supabase refuses the user and the person is asked to check the address or use another one.

  • Cover every way in

    Password, magic link and email code sign-ups, OAuth providers such as Google or GitHub, SAML single sign-on (on Supabase’s Pro plan and above) and the invitations you send all pass through the hook.

  • Stop more, or nothing yet

    Add catch_all or unknown to EV_STOP_STATUSES, or set it to none so the function refuses nobody and only logs what it found.

Set it up. 5 steps.

The short version of the full setup guide, which stays the reference when a step does not match what you see.

Read the full setup guide

  1. Download the function

    It is not on a marketplace: download index.ts from the guide and put it in supabase/functions/email-validation-signup/.

  2. Let the hook reach it

    Supabase Auth sends a hook no JWT, so add [functions.email-validation-signup] with verify_jwt = false to supabase/config.toml.

  3. Deploy and add your key

    Deploy with --no-verify-jwt, then set the secret EV_API_KEY to an API key with Validate addresses and a daily credit cap.

  4. Turn on the hook

    In Authentication, Hooks, add a Before User Created hook of type HTTPS with the function’s URL, generate its secret, and store that as BEFORE_USER_CREATED_HOOK_SECRET.

  5. Try it

    Sign up with no_mailbox@sandbox.email-validation.org: it is refused, for free, and nothing is mailed. Never sign up with a test address that goes through: Supabase would mail its confirmation to it, and the bounce hurts your sender.

Good to know.

  • Until the function has the hook’s secret, it lets every sign-up through unchecked.

  • While the hook is on, Supabase refuses every sign-up if it cannot reach the function at all, so turn the hook off before you remove or rename the function.

  • Users you create yourself with auth.admin.createUser, or Create new user in the dashboard, skip the hook. A sign-up without an email address goes through unchecked.

  • The function waits only a few seconds, inside Supabase’s own limit for a hook, and never retries. With no answer in time, a wrong key or any error, the user is created.

  • The function’s logs show the status and our request id for each refused or unchecked sign-up, never the address. EV_REGION=eu checks addresses in the EU.

Connect Supabase.

Test it on our sandbox addresses for free, then on your own contacts.

Create your accountRead the full setup guide

Updated · Maintained by: Email Validation LLC