Back to Checks
Supabase Auth offers at least one multi-factor authentication method
auth_mfa_factor_enabled
Service: authSeverity: medium
OfficialVerifiedPrivate
Categories:identity-access
Resource Type:SupabaseAuthConfig
Checks that Supabase Auth lets users enroll and verify at least one MFA factor: TOTP, phone or WebAuthn.
Risk
Without an MFA factor, user accounts rely on a single password or magic link, so one leaked credential is enough to take an account over.
Run this check with Prowler
Run in Prowler CloudInstall
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_mfa_factor_enabledRecommendation
Enable at least one MFA factor, such as TOTP, and encourage or require users to enroll.
Remediation
Other
1In the Supabase dashboard, open Authentication > Multi-Factor
2Enable TOTP (App Authenticator) for enrollment and verification
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
MFA_FIELDS = tuple(
f"mfa_{factor}_{step}_enabled"
for factor in ("totp", "phone", "web_authn")
for step in ("enroll", "verify")
)
class auth_mfa_factor_enabled(Check):
def execute(self) -> list[CheckReportSupabase]:
findings = []
for config in auth_client.auth_configs:
report = CheckReportSupabase(metadata=self.metadata(), resource=config)
# A factor counts only when users can both enroll and verify it.
factors = [
factor
for factor, enroll, verify in (
(
"TOTP",
config.mfa_totp_enroll_enabled,
config.mfa_totp_verify_enabled,
),
(
"phone",
config.mfa_phone_enroll_enabled,
config.mfa_phone_verify_enabled,
),
(
"WebAuthn",
config.mfa_web_authn_enroll_enabled,
config.mfa_web_authn_verify_enabled,
),
)
if enroll and verify
]
if not factors and not config.has(*MFA_FIELDS):
continue
if factors:
report.status = "PASS"
report.status_extended = (
f"Project {config.name} offers MFA with: {', '.join(factors)}."
)
else:
report.status = "FAIL"
report.status_extended = (
f"Project {config.name} does not offer any MFA factor."
)
findings.append(report)
return findings