# Supabase Integration for Email Validation

URL: https://email-validation.org/integrations/supabase/
Updated: 2026-11-29

> Documentation index: https://email-validation.org/llms.txt

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 guide](https://email-validation.org/docs/guides/supabase/) [Get an API key](https://email-validation.org/signin/)

- Status: Setup guide
- One TypeScript file with no dependencies

**email-validation-signup** Supabase CLI

Terminal

```bash
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](https://email-validation.org/app/api-keys/) made for it, with a [daily credit cap](https://email-validation.org/docs/authentication/#limits).
- **Costs**: 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org and, in a bulk list, repeats of an address (charged once).
- **Full guide**: [Read the full setup guide](https://email-validation.org/docs/guides/supabase/)

## 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](https://email-validation.org/docs/guides/supabase/), which stays the reference when a step does not match what you see.

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](https://email-validation.org/docs/eu-data-residency/).

## Related

- [The full Supabase setup guide](https://email-validation.org/docs/guides/supabase/)
- [Every secret the function reads](https://email-validation.org/docs/guides/supabase/#settings)
- [If the check cannot be made](https://email-validation.org/docs/guides/supabase/#fail-open)
- [Sign-up form validation](https://email-validation.org/docs/guides/signup-form-validation/)
- [WorkOS integration](https://email-validation.org/integrations/workos/)
- [Auth0 integration](https://email-validation.org/integrations/auth0/)
- [Auth.js integration](https://email-validation.org/integrations/authjs/)
- [Better Auth integration](https://email-validation.org/integrations/better-auth/)
- [All integrations](https://email-validation.org/integrations/)
