feat: block free email provider signups

Mirrors the existing client-side check in the v3 signup form
(company-email-validator via Vuelidate) so non-business emails can no
longer slip in via Google OAuth, direct API calls, or any other path
that bypassed the form.

The deny list ships as config/deny_listed_email_domains.yml — picked up
automatically by ValidEmail2 — and is trimmed to the 6.5k consumer-only
domains the gem's disposable list doesn't already cover.
This commit is contained in:
Shivam Mishra
2026-05-19 13:31:55 +05:30
parent 0cb5eb8a5f
commit 685a1dda48
5 changed files with 6546 additions and 2 deletions
+2
View File
@@ -7,6 +7,8 @@ module CustomExceptions::Account
I18n.t 'errors.signup.blocked_domain'
elsif @data[:disposable]
I18n.t 'errors.signup.disposable_email'
elsif @data[:free_email_provider]
I18n.t 'errors.signup.free_email_provider'
elsif !@data[:valid]
I18n.t 'errors.signup.invalid_email'
end