Repository navigation
Conversation
When the mailer rejects an email change, the 400 response quoted the user's current email instead of the address being confirmed. For an anonymous user linking an email for the first time this produced `Email address "" is invalid`, and for other users it pointed at their existing address rather than the new one. Fixes supabase#2847
|
I ran this against a local server: auth built from the
All of them are 400 The third row is the case from your second note, run for real. The current address is the one the check rejects. Tests: I used an AI assistant (Claude Code) to write the test scripts and help with this write-up. I ran everything on my own machine and checked the output. |
|
Thanks for testing both recipients and sharing the results. Commit |
What
Fixes #2847.
When the mailer rejects an address during an email change (
PUT /user), the 400 response now names the address the mail validator rejected. This covers the new address, including when an anonymous user links an email, and the current address when secure email change sends to both.How
The validation mail client retains the rejected recipient alongside the original validation error.
sendEmailuses that recipient when returningemail_address_invalid. The original validation error remains available througherrors.Is, and the response status and error code are unchanged.Testing
gofmtandgit diff --checkpassed.