Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: allow email rate limit editing when send email hook is enabled (#46104)

Cemal Kılıç02d7454ac914
diff --git a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
index 43bb41cb0d2..3888dcf5e78 100644
--- a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
+++ b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
@@ -70,7 +70,9 @@ export const RateLimits = () => {
},
})
- const canUpdateEmailLimit = authConfig?.EXTERNAL_EMAIL_ENABLED && isSmtpEnabled(authConfig)
+ const canUpdateEmailLimit =
+ authConfig?.EXTERNAL_EMAIL_ENABLED &&
+ (isSmtpEnabled(authConfig) || authConfig?.HOOK_SEND_EMAIL_ENABLED)
const canUpdateSMSRateLimit = authConfig?.EXTERNAL_PHONE_ENABLED
const canUpdateAnonymousUsersRateLimit = authConfig?.EXTERNAL_ANONYMOUS_USERS_ENABLED
const canUpdateWeb3RateLimit = authConfig?.EXTERNAL_WEB3_SOLANA_ENABLED
@@ -271,19 +273,25 @@ export const RateLimits = () => {
) : (
<>
<p className="font-medium">
- Custom SMTP provider is required to update this configuration
+ Custom SMTP or Send Email hook is required to update this
+ configuration
</p>
<p className="mt-1">
- The built-in email service has a fixed rate limit. You will need
- to set up your own custom SMTP provider to update your email
- rate limit
+ The built-in email service has a fixed rate limit. Set up a
+ custom SMTP provider or enable the Send Email hook to update
+ your email rate limit
</p>
- <div className="mt-3">
+ <div className="mt-3 flex gap-2">
<Button asChild type="default" size="tiny">
<Link href={`/project/${projectRef}/auth/smtp`}>
View SMTP settings
</Link>
</Button>
+ <Button asChild type="default" size="tiny">
+ <Link href={`/project/${projectRef}/auth/hooks`}>
+ View hooks
+ </Link>
+ </Button>
</div>
</>
)}