The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: add content_sid variable (#18164)
Joel Lee7f1de2f9fbf5
diff --git a/apps/docs/pages/guides/auth/phone-login/twilio.mdx b/apps/docs/pages/guides/auth/phone-login/twilio.mdxindex c1dd2d29e74..9f439332d6b 100644--- a/apps/docs/pages/guides/auth/phone-login/twilio.mdx+++ b/apps/docs/pages/guides/auth/phone-login/twilio.mdx@@ -114,6 +114,12 @@ Note: for "Twilio Message Service SID" you can use the Sender Phone Number generNow the backend should be setup, we can proceed to add our client-side code!+<Admonition type="info">+ The `Twilio Content SID` field is specific to Twilio Programmable Messaging (WhatsApp) senders.+ Disregard this field if you are only sending SMS messages. Refer to the section on WhatsApp OTP+ Logins for further details.+</Admonition>+#### SMS custom templateThe SMS message sent to a phone containing an OTP code can be customized. This is useful if you need to mention a brand name or display a website address.@@ -400,11 +406,16 @@ Twilio Verify can be used with WhatsApp OTPs with no additional configuration.Complete the following steps to use WhatsApp OTP with Twilio Programmable Messaging:1. Go through the [Twilio self sign up guide for WhatsApp](https://www.twilio.com/docs/whatsapp/self-sign-up).-2. Follow the [Twilio Guide for Submitting Templates](https://www.twilio.com/docs/whatsapp/tutorial/send-whatsapp-notification-messages-templates#creating-message-templates-and-submitting-them-for-approval) and submit a Basic Authentication Message for approval (e.g. Your Code is 123456).+2. Follow the [Twilio Guide for Submitting Templates](https://www.twilio.com/docs/whatsapp/tutorial/send-whatsapp-notification-messages-templates#creating-message-templates-and-submitting-them-for-approval) and submit a Basic Authentication Message for approval.++Alternatively, you can register a Twilio Content SID which corresponds to a message template.+++Note that you may only use one Twilio Content SID at a time. Use Twilio Verify or the Basic Authentication Message if you require internationalization for your message template.<Admonition type="caution">-Twilio Programmable Messaging can only be used with the Basic Authentication Message. For advanced customization options, please use Twilio Verify.+Twilio Programmable Messaging (WhatsApp) can only be used with the Basic Authentication Message. For advanced customization options, please use Twilio Verify.</Admonition>diff --git a/apps/docs/public/img/guides/auth-twilio/8.png b/apps/docs/public/img/guides/auth-twilio/8.pngindex 049621e4534..0d68f830350 100644Binary files a/apps/docs/public/img/guides/auth-twilio/8.png and b/apps/docs/public/img/guides/auth-twilio/8.png differdiff --git a/apps/docs/public/img/guides/auth-twilio/twilio_content_sid.png b/apps/docs/public/img/guides/auth-twilio/twilio_content_sid.pngnew file mode 100644index 00000000000..6510af99676Binary files /dev/null and b/apps/docs/public/img/guides/auth-twilio/twilio_content_sid.png differdiff --git a/studio/components/interfaces/Auth/Auth.types.ts b/studio/components/interfaces/Auth/Auth.types.tsindex c08e8a71a5d..a7e7f50a5b9 100644--- a/studio/components/interfaces/Auth/Auth.types.ts+++ b/studio/components/interfaces/Auth/Auth.types.ts@@ -144,6 +144,7 @@ export interface AuthConfig {SMS_TEXTLOCAL_SENDER: stringSMS_TWILIO_ACCOUNT_SID: stringSMS_TWILIO_AUTH_TOKEN: string+ SMS_TWILIO_CONTENT_SID: stringSMS_TWILIO_MESSAGE_SERVICE_SID: stringSMS_TWILIO_VERIFY_ACCOUNT_SID: stringSMS_TWILIO_VERIFY_AUTH_TOKEN: stringdiff --git a/studio/data/api.d.ts b/studio/data/api.d.tsindex 40c5a16a006..d84f3d4878e 100644--- a/studio/data/api.d.ts+++ b/studio/data/api.d.ts@@ -1798,6 +1798,7 @@ export interface components {SMS_TEXTLOCAL_API_KEY: stringSMS_TEXTLOCAL_SENDER: stringSMS_TWILIO_ACCOUNT_SID: string+ SMS_TWILIO_CONTENT_SID: stringSMS_TWILIO_AUTH_TOKEN: stringSMS_TWILIO_MESSAGE_SERVICE_SID: stringSMS_TWILIO_VERIFY_ACCOUNT_SID: string@@ -1929,6 +1930,7 @@ export interface components {SMS_TEST_OTP_VALID_UNTIL?: stringSMS_TEXTLOCAL_API_KEY?: stringSMS_TEXTLOCAL_SENDER?: string+ SMS_TWILIO_CONTENT_SID?: stringSMS_TWILIO_ACCOUNT_SID?: stringSMS_TWILIO_AUTH_TOKEN?: stringSMS_TWILIO_CONTENT_SID?: string@@ -2058,6 +2060,7 @@ export interface components {SMS_MESSAGEBIRD_ORIGINATOR: stringSMS_TEXTLOCAL_API_KEY: stringSMS_TEXTLOCAL_SENDER: string+ SMS_TWILIO_CONTENT_SID: stringSMS_TWILIO_ACCOUNT_SID: stringSMS_TWILIO_AUTH_TOKEN: stringSMS_TWILIO_MESSAGE_SERVICE_SID: stringdiff --git a/studio/pages/api/auth/[ref]/config.ts b/studio/pages/api/auth/[ref]/config.tsindex aa9cd2c48bc..060a6b3249e 100644--- a/studio/pages/api/auth/[ref]/config.ts+++ b/studio/pages/api/auth/[ref]/config.ts@@ -138,6 +138,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {SMS_PROVIDER: 'twilio',SMS_TWILIO_ACCOUNT_SID: null,SMS_TWILIO_AUTH_TOKEN: null,+ SMS_TWILIO_CONTENT_SID: null,SMS_TWILIO_MESSAGE_SERVICE_SID: null,SMS_TWILIO_VERIFY_ACCOUNT_SID: null,SMS_TWILIO_VERIFY_AUTH_TOKEN: null,diff --git a/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx b/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsxindex 7bd1b49426c..8c81a5846b2 100644--- a/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx+++ b/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx@@ -88,7 +88,7 @@ const PROVIDER_PHONE = {// TwilioSMS_TWILIO_ACCOUNT_SID: {type: 'string',- title: 'Twilio Account Sid',+ title: 'Twilio Account SID',show: {key: 'SMS_PROVIDER',matches: ['twilio'],@@ -105,7 +105,15 @@ const PROVIDER_PHONE = {},SMS_TWILIO_MESSAGE_SERVICE_SID: {type: 'string',- title: 'Twilio Message Service Sid',+ title: 'Twilio Message Service SID',+ show: {+ key: 'SMS_PROVIDER',+ matches: ['twilio'],+ },+ },+ SMS_TWILIO_CONTENT_SID: {+ type: 'string',+ title: 'Twilio Content SID (Optional, For WhatsApp Only)',show: {key: 'SMS_PROVIDER',matches: ['twilio'],@@ -115,7 +123,7 @@ const PROVIDER_PHONE = {// Twilio VerifySMS_TWILIO_VERIFY_ACCOUNT_SID: {type: 'string',- title: 'Twilio Account Sid',+ title: 'Twilio Account SID',show: {key: 'SMS_PROVIDER',matches: ['twilio_verify'],@@ -132,7 +140,7 @@ const PROVIDER_PHONE = {},SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: {type: 'string',- title: 'Twilio Verify Service Sid',+ title: 'Twilio Verify Service SID',show: {key: 'SMS_PROVIDER',matches: ['twilio_verify'],