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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user