-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add email validation function to lower bounce rates #1845
Conversation
The goal is to only return an error when we have a very high confidence the email won't be deliverable.
Pull Request Test Coverage Report for Build 12189005080Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed internally, one suggestion would be to add this validation in the sendEmail
function (
Line 603 in 7de6bfb
func (a *API) sendEmail(r *http.Request, tx *storage.Connection, u *models.User, emailActionType, otp, otpNew, tokenHashWithPrefix string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in terms of where we should include this validation, i'm thinking it can either be used in:
- The
validateEmail
API struct method (Line 563 in 49fbbf0
func (a *API) validateEmail(email string) (string, error) { - Or in
sendEmail
, before we make the request to the SMTP server (Line 603 in 49fbbf0
func (a *API) sendEmail(r *http.Request, tx *storage.Connection, u *models.User, emailActionType, otp, otpNew, tokenHashWithPrefix string) error {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a bunch of readability nits that can be cleaned up in a follow up
🤖 I have created a release *beep* *boop* --- ## [2.165.0](v2.164.0...v2.165.0) (2024-12-05) ### Features * add email validation function to lower bounce rates ([#1845](#1845)) ([2c291f0](2c291f0)) * use embedded migrations for `migrate` command ([#1843](#1843)) ([e358da5](e358da5)) ### Bug Fixes * fallback on btree indexes when hash is unavailable ([#1856](#1856)) ([b33bc31](b33bc31)) * return the error code instead of status code ([#1855](#1855)) ([834a380](834a380)) * revert fallback on btree indexes when hash is unavailable ([#1858](#1858)) ([1c7202f](1c7202f)) * update ip mismatch error message ([#1849](#1849)) ([49fbbf0](49fbbf0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The purpose of this change is to reduce the bounce back rate of the default email provider at Supabase. This change will allow users to continue copying examples from the docs. Without it, an upcoming change in supabase/auth[1] will begin rejecting these invalid emails. [1] supabase/auth#1845
The purpose of this change is to reduce the bounce back rate of the default email provider at Supabase. This change will allow users to continue copying examples from the docs. Without it, an upcoming change in supabase/auth[1] will begin rejecting these invalid emails. [1] supabase/auth#1845 Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
The goal is to only return an error when we have a very high confidence the email won't be deliverable.
This is currently going to be added as a draft for the team to review. I haven't actually implemented any paths that call this or configuration around when it is activated.