Skip to content

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

Revert "feat: update studio config to include twilio verify"

Joel Lee9327e71bc02c
diff --git a/studio/components/interfaces/Auth/Auth.types.ts b/studio/components/interfaces/Auth/Auth.types.ts
index 55b756c31bd..3c4118ec83b 100644
--- a/studio/components/interfaces/Auth/Auth.types.ts
+++ b/studio/components/interfaces/Auth/Auth.types.ts
@@ -137,9 +137,6 @@ export interface AuthConfig {
SMS_TWILIO_ACCOUNT_SID: string
SMS_TWILIO_AUTH_TOKEN: string
SMS_TWILIO_MESSAGE_SERVICE_SID: string
- SMS_TWILIO_VERIFY_ACCOUNT_SID: string
- SMS_TWILIO_VERIFY_AUTH_TOKEN: string
- SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: string
SMS_VONAGE_API_KEY: string
SMS_VONAGE_API_SECRET: string
SMS_VONAGE_FROM: string
diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
index a9665541e76..ddb160631fb 100644
--- a/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
+++ b/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
@@ -14,8 +14,7 @@ interface Props {
const FormField: FC<Props> = ({ name, properties, formValues, disabled = false }) => {
const [hidden, setHidden] = useState(!!properties.isSecret)
- if (properties.show && !properties.show.matches.includes(formValues[properties.show.key]))
- return null
+ if (properties.show && formValues[properties.show.key] !== properties.show.matches) return null
switch (properties.type) {
case 'string':
diff --git a/studio/pages/api/auth/[ref]/config.ts b/studio/pages/api/auth/[ref]/config.ts
index 34878dd37f3..80f655a588d 100644
--- a/studio/pages/api/auth/[ref]/config.ts
+++ b/studio/pages/api/auth/[ref]/config.ts
@@ -106,6 +106,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
EXTERNAL_ZOOM_ENABLED: false,
EXTERNAL_ZOOM_CLIENT_ID: null,
EXTERNAL_ZOOM_SECRET: null,
+
MAILER_SUBJECTS_INVITE: 'You have been invited',
MAILER_SUBJECTS_CONFIRMATION: 'Confirm Your Signup',
MAILER_SUBJECTS_RECOVERY: 'Reset Your Password',
@@ -136,9 +137,6 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
SMS_TWILIO_ACCOUNT_SID: null,
SMS_TWILIO_AUTH_TOKEN: null,
SMS_TWILIO_MESSAGE_SERVICE_SID: null,
- SMS_TWILIO_VERIFY_ACCOUNT_SID: null,
- SMS_TWILIO_VERIFY_AUTH_TOKEN: null,
- SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: null,
SMS_TEMPLATE: 'Your code is {{ .Code }}',
SECURITY_CAPTCHA_ENABLED: false,
SECURITY_CAPTCHA_PROVIDER: 'hcaptcha',
diff --git a/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx b/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx
index 8771c1ca075..48eefc8e24e 100644
--- a/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx
+++ b/studio/stores/authConfig/schema/AuthProviders/AuthProvidersFormValidation.tsx
@@ -81,7 +81,6 @@ const PROVIDER_PHONE = {
{ label: 'Messagebird', value: 'messagebird', icon: 'messagebird-icon.svg' },
{ label: 'Textlocal', value: 'textlocal', icon: 'textlocal-icon.png' },
{ label: 'Vonage', value: 'vonage', icon: 'vonage-icon.svg' },
- { label: 'Twilio Verify', value: 'twilio-verify', icon: 'twilio-icon.svg' }
],
},
RATE_LIMIT_SMS_SENT: {
@@ -96,7 +95,7 @@ const PROVIDER_PHONE = {
title: 'Twilio Account Sid',
show: {
key: 'SMS_PROVIDER',
- matches: ['twilio'],
+ matches: 'twilio',
},
},
SMS_TWILIO_AUTH_TOKEN: {
@@ -105,7 +104,7 @@ const PROVIDER_PHONE = {
isSecret: true,
show: {
key: 'SMS_PROVIDER',
- matches: ['twilio'],
+ matches: 'twilio',
},
},
SMS_TWILIO_MESSAGE_SERVICE_SID: {
@@ -113,34 +112,7 @@ const PROVIDER_PHONE = {
title: 'Twilio Message Service Sid',
show: {
key: 'SMS_PROVIDER',
- matches: ['twilio'],
- },
- },
-
- // Twilio Verify
- SMS_TWILIO_VERIFY_ACCOUNT_SID: {
- type: 'string',
- title: 'Twilio Account Sid',
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio-verify'],
- },
- },
- SMS_TWILIO_VERIFY_AUTH_TOKEN: {
- type: 'string',
- title: 'Twilio Auth Token',
- isSecret: true,
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio-verify'],
- },
- },
- SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: {
- type: 'string',
- title: 'Twilio Message Service Sid',
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio-verify'],
+ matches: 'twilio',
},
},
@@ -150,7 +122,7 @@ const PROVIDER_PHONE = {
title: 'Messagebird Access Key',
show: {
key: 'SMS_PROVIDER',
- matches: ['messagebird'],
+ matches: 'messagebird',
},
},
SMS_MESSAGEBIRD_ORIGINATOR: {
@@ -158,7 +130,7 @@ const PROVIDER_PHONE = {
title: 'Messagebird Originator',
show: {
key: 'SMS_PROVIDER',
- matches: ['messagebird'],
+ matches: 'messagebird',
},
},
@@ -168,7 +140,7 @@ const PROVIDER_PHONE = {
title: 'Textlocal API Key',
show: {
key: 'SMS_PROVIDER',
- matches: ['textlocal'],
+ matches: 'textlocal',
},
},
SMS_TEXTLOCAL_SENDER: {
@@ -176,7 +148,7 @@ const PROVIDER_PHONE = {
title: 'Textlocal Sender',
show: {
key: 'SMS_PROVIDER',
- matches: ['textlocal'],
+ matches: 'textlocal',
},
},
@@ -186,7 +158,7 @@ const PROVIDER_PHONE = {
title: 'Vonage API Key',
show: {
key: 'SMS_PROVIDER',
- matches: ['vonage'],
+ matches: 'vonage',
},
},
SMS_VONAGE_API_SECRET: {
@@ -194,7 +166,7 @@ const PROVIDER_PHONE = {
title: 'Vonage API Secret',
show: {
key: 'SMS_PROVIDER',
- matches: ['vonage'],
+ matches: 'vonage',
},
},
// [TODO] verify what this is?
@@ -203,7 +175,7 @@ const PROVIDER_PHONE = {
title: 'Vonage From',
show: {
key: 'SMS_PROVIDER',
- matches: ['vonage'],
+ matches: 'vonage',
},
},
@@ -219,29 +191,17 @@ const PROVIDER_PHONE = {
type: 'number',
description: 'Duration before an SMS OTP expires',
units: 'seconds',
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio', 'messagebird', 'textlocal', 'vonage']
- }
},
SMS_OTP_LENGTH: {
title: 'SMS OTP Length',
type: 'number',
description: 'Number of digits in OTP',
units: 'digits',
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio', 'messagebird', 'textlocal', 'vonage']
- }
},
SMS_TEMPLATE: {
title: 'SMS Message',
type: 'string',
description: 'To format the OTP code use `{{ .Code }}`',
- show: {
- key: 'SMS_PROVIDER',
- matches: ['twilio', 'messagebird', 'textlocal', 'vonage']
- }
},
},
validationSchema: object().shape({
@@ -271,29 +231,6 @@ const PROVIDER_PHONE = {
otherwise: (schema) => schema,
}),
- // Twilio Verify
- SMS_TWILIO_VERIFY_ACCOUNT_SID: string().when(['EXTERNAL_PHONE_ENABLED', 'SMS_PROVIDER'], {
- is: (EXTERNAL_PHONE_ENABLED: boolean, SMS_PROVIDER: string) => {
- return EXTERNAL_PHONE_ENABLED && SMS_PROVIDER === 'twilio-verify'
- },
- then: (schema) => schema.required('Twilio Verify Account SID is required'),
- otherwise: (schema) => schema,
- }),
- SMS_TWILIO_VERIFY_AUTH_TOKEN: string().when(['EXTERNAL_PHONE_ENABLED', 'SMS_PROVIDER'], {
- is: (EXTERNAL_PHONE_ENABLED: boolean, SMS_PROVIDER: string) => {
- return EXTERNAL_PHONE_ENABLED && SMS_PROVIDER === 'twilio-verify'
- },
- then: (schema) => schema.required('Twilio Verify Auth Token is required'),
- otherwise: (schema) => schema,
- }),
- SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID: string().when(['EXTERNAL_PHONE_ENABLED', 'SMS_PROVIDER'], {
- is: (EXTERNAL_PHONE_ENABLED: boolean, SMS_PROVIDER: string) => {
- return EXTERNAL_PHONE_ENABLED && SMS_PROVIDER === 'twilio-verify'
- },
- then: (schema) => schema.required('Twilio Verify Service SID is required'),
- otherwise: (schema) => schema,
- }),
-
// Messagebird
SMS_MESSAGEBIRD_ACCESS_KEY: string().when(['EXTERNAL_PHONE_ENABLED', 'SMS_PROVIDER'], {
is: (EXTERNAL_PHONE_ENABLED: boolean, SMS_PROVIDER: string) => {
diff --git a/studio/stores/jsonSchema/auth_gotrue_config.json b/studio/stores/jsonSchema/auth_gotrue_config.json
index 9d820c8d39b..e190bc15bac 100644
--- a/studio/stores/jsonSchema/auth_gotrue_config.json
+++ b/studio/stores/jsonSchema/auth_gotrue_config.json
@@ -543,19 +543,6 @@
"type": "string",
"help": "Twilio message service SID or twilio phone number"
},
- "SMS_TWILIO_VERIFY_ACCOUNT_SID": {
- "title": "Twilio account SID",
- "type": "string"
- },
- "SMS_TWILIO_VERIFY_AUTH_TOKEN": {
- "title": "Twilio Verify auth token",
- "type": "string"
- },
- "SMS_TWILIO_VERIFY_MESSAGE_SERVICE_SID": {
- "title": "Twilio Verify service SID",
- "type": "string",
- "help": "Twilio Verify service SID"
- },
"SMS_MESSAGEBIRD_ACCESS_KEY": {
"title": "Messagebird access key",
"type": "string"