Replies: 7 comments
|
The supabase email service has rate limits, try using a custom SMTP. Also i would check that the email domain does not look like spam/temporary as that has caused problems before. |
|
Hi! I think there are two separate things worth checking here: email validation and the recovery redirect. The redirect URL only controls where the user is sent after opening a recovery link. Changing it shouldn't by itself cause an email address to become invalid. One important detail is the actual Supabase error code.
Since you're using the default email provider, remember that Supabase currently restricts delivery to email addresses belonging to your project's organization. For production users, you'll need custom SMTP. I'd suggest checking the following:
Supabase documents the errors here: And the default SMTP restrictions here: If you can share the sanitized error code and status, it should be possible to narrow this down considerably without exposing the user's email or any credentials. |
|
Since recovery emails were delivered before, I'd separate the email-validation issue from the redirect URL issue first. The redirect URL controls where the user goes after recovery, but it shouldn't normally determine whether the email address itself is valid. A couple of things I'd check:
This could help distinguish a validation issue from a redirect configuration problem. I'd avoid posting the actual email address publicly. If both tests fail with the same error, the Auth error code and request timestamp would be useful for Supabase support. |
|
Two separate things are going on here, and the first email you got points at one of them. A recovery link that opened localhost:3000 usually means the Site URL in your project is still the default. Supabase's redirect URL docs say that setting is the default redirect when no redirectTo is passed, and to change it from http://localhost:3000 to your production URL. It is under Authentication, URL Configuration. Also check that your production address is listed in Redirect URLs, since redirectTo has to match an allowed entry. The invalid email error is a different path. As mentioned above, look at the exact error code in the response from /auth/v1/recover and in the Auth logs. If it is email not authorized instead, that is the default email service only sending to addresses on your organization's Team tab, and the SMTP docs say to set up custom SMTP for real users. I wrote up the common causes and how to find yours: https://vibe-fixer.com/guides/password-reset-link-opens-wrong-site?src=gh-sbreset. I run VibeFix. |
|
The message text alone is ambiguous — the deciding detail is the exact
The localhost link in the first email is a separate issue and already covered above: your Site URL under Authentication → URL Configuration was still the default |
|
I found a very similar report in #51652, and the GoTrue source gives us a useful workaround here. In If your response code is const { data, error } = await supabaseAdmin.auth.admin.generateLink({
type: 'recovery',
email: userEmail,
options: {
redirectTo: 'https://exclusive-parking.vercel.app/reset-password'
}
});
if (error) throw error;
// Deliver data.properties.action_link securely
// through your own email provider.Unlike Important: this must run on a trusted backend with a server-only admin key. Never expose or log the generated link or token, and only deliver it to the verified account owner. This doesn't fix the underlying validator. If If the actual code is |
|
The message
const { error } = await supabase.auth.resetPasswordForEmail(email.trim(), {
redirectTo: 'https://your-app.vercel.app/reset-password',
});
if (error) console.error(error.code, error.status, error.message);The validator only runs when Auth is actually about to send. For an address with no account, Auth sends nothing and returns success, so it never trips. That's why a real user can fail while a fake address "works". Test against the deployed domain's actual MX with The earlier localhost link is a separate issue. It comes from the Site URL under Authentication → URL Configuration still being One security note: on your reset form, show the same "if an account exists, we've sent a link" message whatever the error. Showing different text for this error reveals which addresses have accounts. I wrote up the details here: https://www.guardlayer.io/blog/supabase-email-address-invalid-password-reset |
Uh oh!
There was an error while loading. Please reload this page.
Hello Supabase community,
I'm building a Next.js application hosted on Vercel, using Supabase Auth for user authentication.
When calling
supabase.auth.resetPasswordForEmail()for an existing user, I receive this error:Email address "[redacted]" is invalidThe mailbox is active and used daily. The address format is valid, and the account exists in Authentication → Users.
What I have checked:
resetPasswordForEmail()call specifieshttps://exclusive-parking.vercel.app/reset-passwordas the redirect URL./reset-passwordpage exists and the Vercel deployment succeeds.An earlier recovery email was delivered, but its link redirected to
localhost:3000. After correcting the redirect configuration, recovery attempts began returning the invalid-email error.Has anyone experienced this behaviour with Supabase Auth? How can I determine whether the rejection comes from GoTrue's email validation, project configuration, or another cause?
I have not included any secret keys, passwords, or access tokens.
Thank you.
All reactions