Back to Checks
supabase

Supabase Auth sends email through a custom SMTP server

auth_custom_smtp_configured
Service: authSeverity: low
OfficialVerifiedPrivate
Categories:email-security
Resource Type:SupabaseAuthConfig

Checks that Supabase Auth sends its emails through a custom SMTP server instead of the built-in one.

Risk

The built-in email service is rate limited and meant for testing. Confirmation and password reset emails may not arrive, and they come from a domain you do not control.

Run this check with Prowler

Run in Prowler Cloud
Install
pip install --extra-index-url https://__token__:${PROWLER_REGISTRY_DOWNLOAD_API_KEY}@registry.prowler.com/simple/ "prowler-provider-supabase[runtime]"
Run
prowler supabase --checks auth_custom_smtp_configured

Recommendation

Configure a custom SMTP server for production projects.

Remediation

Other

1In the Supabase dashboard, open Authentication > Emails > SMTP Settings
2Turn on Enable Custom SMTP and enter your provider's settings
3Save

Check Code

from prowler.lib.check.models import Check

from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.auth.auth_client import auth_client


class auth_custom_smtp_configured(Check):
    def execute(self) -> list[CheckReportSupabase]:
        findings = []
        for config in auth_client.auth_configs:
            if not config.has("smtp_host"):
                continue
            report = CheckReportSupabase(metadata=self.metadata(), resource=config)
            if config.smtp_host:
                report.status = "PASS"
                report.status_extended = f"Project {config.name} sends Auth emails through {config.smtp_host}."
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Project {config.name} sends Auth emails through the built-in "
                    "Supabase email service."
                )
            findings.append(report)
        return findings