From 40f4965667fb0f9e099dae5f23187bb7eebcc4de Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Wed, 16 Nov 2022 07:09:18 +0100 Subject: [PATCH 1/3] chore: bump Gotrue version to v2.31.0 (#10352) bump --- docker/docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index bfcf022d9bc..96fbeb101b5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -45,7 +45,7 @@ services: auth: container_name: supabase-auth - image: supabase/gotrue:v2.19.4 + image: supabase/gotrue:v2.31.0 depends_on: db: # Disable this if you are using an external Postgres database condition: service_healthy @@ -85,6 +85,7 @@ services: GOTRUE_EXTERNAL_PHONE_ENABLED: ${ENABLE_PHONE_SIGNUP} GOTRUE_SMS_AUTOCONFIRM: ${ENABLE_PHONE_AUTOCONFIRM} + MFA_ENABLED: ${MFA_ENABLED} rest: container_name: supabase-rest From fb386044d8b9bedaa1c2df1b04795ada78274c09 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Mon, 14 Nov 2022 18:17:58 +0800 Subject: [PATCH 2/3] Add setting for auth mfa --- .../interfaces/Auth/AutoSchemaForm.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/studio/components/interfaces/Auth/AutoSchemaForm.tsx b/studio/components/interfaces/Auth/AutoSchemaForm.tsx index 0e037598632..37596c0bda1 100644 --- a/studio/components/interfaces/Auth/AutoSchemaForm.tsx +++ b/studio/components/interfaces/Auth/AutoSchemaForm.tsx @@ -25,12 +25,13 @@ const AutoSchemaForm = observer(() => { const INITIAL_VALUES = { DISABLE_SIGNUP: !authConfig.config.DISABLE_SIGNUP, - JWT_EXP: authConfig.config.JWT_EXP, SITE_URL: authConfig.config.SITE_URL, + JWT_EXP: authConfig.config.JWT_EXP, REFRESH_TOKEN_ROTATION_ENABLED: authConfig.config.REFRESH_TOKEN_ROTATION_ENABLED || false, SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: authConfig.config.SECURITY_REFRESH_TOKEN_REUSE_INTERVAL, SECURITY_CAPTCHA_ENABLED: authConfig.config.SECURITY_CAPTCHA_ENABLED || false, SECURITY_CAPTCHA_SECRET: authConfig.config.SECURITY_CAPTCHA_SECRET || '', + MAX_ENROLLED_FACTORS: authConfig.config.MAX_ENROLLED_FACTORS || 10, // [TODO remove the 10] } const schema = object({ @@ -48,6 +49,9 @@ const AutoSchemaForm = observer(() => { is: true, then: string().required('Must have a hCaptcha secret'), }), + MAX_ENROLLED_FACTORS: number() + .min(0, 'Must be be a value more than 0') + .max(30, 'Must be a value less than 30'), }) const onSubmit = async (values: any, { setSubmitting, resetForm }: any) => { @@ -175,7 +179,7 @@ const AutoSchemaForm = observer(() => { id="SECURITY_REFRESH_TOKEN_REUSE_INTERVAL" size="small" min={0} - label="Reuse Interval" + label="Reuse interval" descriptionText="Time interval where the same refresh token can be used to request for an access token." actions={seconds} disabled={!canUpdateConfig} @@ -183,6 +187,18 @@ const AutoSchemaForm = observer(() => { )} + Multi Factor Authentication (MFA)} + > + + + + ) From 0b6f6c1ed4f9e646d6b6b341354b013ceea763fa Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Wed, 16 Nov 2022 16:01:30 +0800 Subject: [PATCH 3/3] Remove default value for max enrolled factors --- studio/components/interfaces/Auth/AutoSchemaForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/components/interfaces/Auth/AutoSchemaForm.tsx b/studio/components/interfaces/Auth/AutoSchemaForm.tsx index 37596c0bda1..36fc149755d 100644 --- a/studio/components/interfaces/Auth/AutoSchemaForm.tsx +++ b/studio/components/interfaces/Auth/AutoSchemaForm.tsx @@ -31,7 +31,7 @@ const AutoSchemaForm = observer(() => { SECURITY_REFRESH_TOKEN_REUSE_INTERVAL: authConfig.config.SECURITY_REFRESH_TOKEN_REUSE_INTERVAL, SECURITY_CAPTCHA_ENABLED: authConfig.config.SECURITY_CAPTCHA_ENABLED || false, SECURITY_CAPTCHA_SECRET: authConfig.config.SECURITY_CAPTCHA_SECRET || '', - MAX_ENROLLED_FACTORS: authConfig.config.MAX_ENROLLED_FACTORS || 10, // [TODO remove the 10] + MAX_ENROLLED_FACTORS: authConfig.config.MAX_ENROLLED_FACTORS, } const schema = object({