Fix guide · updated 2026-11-16
Supabase "Email address is invalid"
AuthApiError: Email address "test@example.com" is invalid · email_address_invalid · 400
Sign-up, a magic link or a password reset fails with Email address "test@example.com" is invalid. The address is shaped like an email, and maybe it worked on your machine. We ran Supabase's real Auth server with its email check turned on, plus supabase-js 2.119, and tried 21 addresses and the calls that send email. Two surprises: the check only runs when Auth is about to send an email, and when a user changes their email, the message names the wrong address.
What the error means
Before Supabase Auth sends any email (sign-up confirmation, magic link or code, password reset, invite, email change), it checks the address it's sending to. If the address fails, Auth sends nothing and answers:
400 {"code":"email_address_invalid","message":"Email address \"test@example.com\" is invalid"}
From curl, Postman or another language, without the version header supabase-js sends:
400 {"code":400,"error_code":"email_address_invalid","msg":"Email address \"test@example.com\" is invalid"}
Supabase's error-code docs sum it up as "Example and test domains are currently not supported". It's a different check from "Unable to validate email address: invalid format", which refuses addresses that aren't shaped like an email. This one refuses addresses that look fine but can't receive mail. It's in Auth since v2.165 (December 2024) and is off unless Auth starts with GOTRUE_MAILER_EMAIL_VALIDATION_EXTENDED=true. Hosted projects have it on. The Supabase CLI (v3.1.0) doesn't set it, so supabase start accepts test@example.com and your hosted project refuses it.
Nothing is saved when it fails. In our test, refused sign-ups, magic-link sign-ups and invites left no user behind, so the person can just try again with the right address.
1. A test or example address
These are refused without any network lookup (from Auth's validateclient.go; every one we tried was refused):
- Domains:
example.com,example.net,example.org,test.com,email.com,anonymous.com, and the typosgamil.comandgamai.com. - Any domain ending in
.test,.example,.invalid,.localor.localhost. That includes company network names likeana@company.local. - A domain with no dot:
ana@localhost,ana@mycompany. - Four exact addresses:
test@gmail.com,example@gmail.com,someone@gmail.com,test@email.com.
Capitals don't help: Test@Example.COM was refused, and the message showed it in lower case, because Auth lowercases the address first.
To test your app, use addresses that really receive mail. Gmail and many other providers deliver you+test1@yourdomain.com to you@yourdomain.com, so one inbox gives you as many test accounts as you need. For automated tests, create users on the server with auth.admin.createUser({ email, password, email_confirm: true }) and get links with auth.admin.generateLink(): neither sends an email, so neither is checked. In our test, owner@example.com was created this way and signed in with its password.
2. A short Gmail address
At gmail.com, the part before the @ must be at least 6 characters, because Gmail itself requires 6. A comment in Auth's code says this rule cut bounced emails by 23%. Dots and +tags count as characters:
ana@gmail.com // refused
ana.b@gmail.com // refused (5 characters)
ana+1@gmail.com // refused (5 characters)
ana+test@gmail.com // accepted (8 characters)
anabelle@gmail.com // accepted
A real Gmail user rarely has an address this short, so a refusal here usually means a test address or a typo.
3. A domain that doesn't exist
For other domains, Auth asks DNS whether the domain has a mail server (MX record), and if not, whether it exists at all. We gave Auth a DNS server of our own to see each case:
- A domain that doesn't exist, like the typo
ana@gmail.con: refused. - A domain with a mail server: accepted. A domain with only a website address (no MX record): accepted too, since mail can go to that host.
- A DNS server that fails or doesn't answer: accepted. Auth waits up to 3 seconds, then lets the address through. It refuses only when DNS clearly answers that the domain has no mail server and no address.
Big providers (gmail.com, outlook.com, yahoo.com, icloud.com and others) skip the DNS lookup. So when a real person gets this error, it's almost always a typo in the domain. Tell them that in plain words (code below).
4. It only happens when Auth sends an email
The check sits in the code that sends email, so the same address passes or fails depending on the call. In our test, with @example.com addresses:
signUp()with Confirm email on: refused. With Confirm email off, no email is sent:quick@example.comsigned up and got a session, then got this error onresetPasswordForEmail()andsignInWithOtp().signInWithOtp(),resend({ type: 'signup' })andauth.admin.inviteUserByEmail(): refused.resetPasswordForEmail(): refused when the account exists,okwhen it doesn't, because Auth sends nothing then (open issue supabase/auth#2702).signInWithPassword(),auth.admin.createUser()andauth.admin.generateLink(): never checked.
So an account created while Confirm email was off, or by a seed script, can sign in for weeks and then hit this error the first time it needs a reset link.
5. Changing an email: the message names the wrong address
When a signed-in user changes their email, Auth checks the new address (and the current one too, with the default secure email change). But the message names the current address. In our test:
// signed in as ana.real@realmail.dev
supabase.auth.updateUser({ email: 'ana.new@example.com' })
// Email address "ana.real@realmail.dev" is invalid
// signed in anonymously (a guest adding an email)
supabase.auth.updateUser({ email: 'guest@example.com' })
// Email address "" is invalid
The current address is fine. It's the new one that was refused: the same users changed to an address on a real domain without error. The empty "" for guests is open issue supabase/auth#2847. So on a change-email form, ignore the address in the message and tell the user their new address can't receive email.
Show a message people understand
Check the error code, not the message, and say what to do:
const { error } = await supabase.auth.signUp({ email, password })
if (error?.code === 'email_address_invalid') {
setError("We can't send email to this address. Check it for typos, or use another one.")
} else if (error) {
setError(error.message)
}
On the change-email form, use "We can't send email to your new address."
A real address that's still refused
If the address passes every rule above and the domain receives mail, the refusal isn't explained by Auth's open-source code. People report hosted projects refusing real-looking Gmail addresses (supabase/supabase#53456 on sign-up, #52484 on a password reset), and the code can also ask a separate validation service before sending. Only Supabase can see that, so contact Supabase support with the request time and the address.
If an AI tool built your app
Give your AI tool this prompt:
When Supabase Auth returns the error code email_address_invalid (from signUp, signInWithOtp, resetPasswordForEmail, resend or updateUser), show "We can't send email to this address. Check it for typos, or use another one." next to the email field instead of the raw message. On the change-email form, say it's the new address that can't receive email. Don't use example.com, test.com or other fake addresses in seed data or tests. Don't change anything else.
Not quite your error?
- "Unable to validate email address: invalid format": the address isn't shaped like an email.
- "Email address "x" cannot be used as it is not authorized", or "Error sending confirmation email": Supabase's built-in email only sends to your team.
- "email rate limit exceeded": too many emails in an hour.
- "missing email or phone": the email never reached the request.
Still stuck?
Open the failed request in your browser's Network tab. The path tells you which call sent the email (signup, otp, recover, user, resend), and the payload shows the address Auth got. Check that address for a typo, a test domain or a short Gmail name before you look anywhere else.
Other Supabase problems? See Supabase fixes.