Close. Three pieces:
redirectTomust be a full URL, and on the Redirect URLs allow-list:
await supabase.auth.resetPasswordForEmail(email, {
redirectTo: `${window.location.origin}/reset-password`,
})Without that, Supabase sends people to the Site URL (your homepage) and they're just logged in, which is what you see.
- On
/reset-password, listen for the recovery event instead of parsing the URL:
supabase.auth.onAuthStateChange((event) => {
if (event === 'PASSWORD_RECOVERY') setShowForm(true)
})- The form calls
supabase.auth.updateUser({ password: newPassword }).