Skip to content

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

Remove mfaSso feature flag

Joshen Limd8a6e3198cf3
diff --git a/studio/components/interfaces/Auth/AutoSchemaForm.tsx b/studio/components/interfaces/Auth/AutoSchemaForm.tsx
index d553fcf588d..75daad1fdfc 100644
--- a/studio/components/interfaces/Auth/AutoSchemaForm.tsx
+++ b/studio/components/interfaces/Auth/AutoSchemaForm.tsx
@@ -4,7 +4,7 @@ import { boolean, number, object, string } from 'yup'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { Button, Form, Input, IconEye, IconEyeOff, InputNumber, Toggle } from 'ui'
-import { useStore, checkPermissions, useFlag } from 'hooks'
+import { useStore, checkPermissions } from 'hooks'
import {
FormActions,
FormHeader,
@@ -20,8 +20,6 @@ const AutoSchemaForm = observer(() => {
const formId = 'auth-config-general-form'
const [hidden, setHidden] = useState(true)
-
- const showMfaSso = useFlag('mfaSso')
const canUpdateConfig = checkPermissions(PermissionAction.UPDATE, 'custom_config_gotrue')
const INITIAL_VALUES = {
@@ -188,20 +186,18 @@ const AutoSchemaForm = observer(() => {
)}
</FormSectionContent>
</FormSection>
- {showMfaSso && (
- <FormSection
- header={<FormSectionLabel>Multi Factor Authentication (MFA)</FormSectionLabel>}
- >
- <FormSectionContent loading={!isLoaded}>
- <InputNumber
- id="MAX_ENROLLED_FACTORS"
- size="small"
- label="Maximum number of enrolled factors"
- disabled={!canUpdateConfig}
- />
- </FormSectionContent>
- </FormSection>
- )}
+ <FormSection
+ header={<FormSectionLabel>Multi Factor Authentication (MFA)</FormSectionLabel>}
+ >
+ <FormSectionContent loading={!isLoaded}>
+ <InputNumber
+ id="MAX_ENROLLED_FACTORS"
+ size="small"
+ label="Maximum number of enrolled factors"
+ disabled={!canUpdateConfig}
+ />
+ </FormSectionContent>
+ </FormSection>
</FormPanel>
</>
)
diff --git a/studio/components/interfaces/Auth/Users/UserDropdown.tsx b/studio/components/interfaces/Auth/Users/UserDropdown.tsx
index 42dd95b7444..016f4e20dc2 100644
--- a/studio/components/interfaces/Auth/Users/UserDropdown.tsx
+++ b/studio/components/interfaces/Auth/Users/UserDropdown.tsx
@@ -3,7 +3,7 @@ import { observer } from 'mobx-react-lite'
import * as Tooltip from '@radix-ui/react-tooltip'
import { Button, Dropdown, IconTrash, IconMail, IconMoreHorizontal, IconShieldOff } from 'ui'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { timeout } from 'lib/helpers'
import { post, delete_ } from 'lib/common/fetch'
import { API_URL } from 'lib/constants'
@@ -18,7 +18,6 @@ interface Props {
}
const UserDropdown: FC<Props> = ({ user, canRemoveUser, canRemoveMFAFactors }) => {
- const showDeleteFactorsDropdown = useFlag('mfaSso')
const PageState: any = useContext(PageContext)
const { ui } = useStore()
const [loading, setLoading] = useState<boolean>(false)
@@ -170,38 +169,36 @@ const UserDropdown: FC<Props> = ({ user, canRemoveUser, canRemoveMFAFactors }) =
</Dropdown.Item>
) : null}
<Dropdown.Separator />
- {showDeleteFactorsDropdown && (
- <Tooltip.Root delayDuration={0}>
- <Tooltip.Trigger className="w-full">
- <Dropdown.Item
- onClick={handleDeleteFactors}
- icon={<IconShieldOff size="tiny" />}
- disabled={!canRemoveMFAFactors}
- >
- Remove MFA factors
- </Dropdown.Item>
- </Tooltip.Trigger>
- {/*
+ <Tooltip.Root delayDuration={0}>
+ <Tooltip.Trigger className="w-full">
+ <Dropdown.Item
+ onClick={handleDeleteFactors}
+ icon={<IconShieldOff size="tiny" />}
+ disabled={!canRemoveMFAFactors}
+ >
+ Remove MFA factors
+ </Dropdown.Item>
+ </Tooltip.Trigger>
+ {/*
[Joshen] Deleting MFA factors should be different ABAC perms i think
need to double check with KM / anyone familiar with ABAC
*/}
- {!canRemoveMFAFactors && (
- <Tooltip.Content side="bottom">
- <Tooltip.Arrow className="radix-tooltip-arrow" />
- <div
- className={[
- 'rounded bg-scale-100 py-1 px-2 leading-none shadow',
- 'border border-scale-200',
- ].join(' ')}
- >
- <span className="text-xs text-scale-1200">
- You need additional permissions to remove a user's authentication factors.
- </span>
- </div>
- </Tooltip.Content>
- )}
- </Tooltip.Root>
- )}
+ {!canRemoveMFAFactors && (
+ <Tooltip.Content side="bottom">
+ <Tooltip.Arrow className="radix-tooltip-arrow" />
+ <div
+ className={[
+ 'rounded bg-scale-100 py-1 px-2 leading-none shadow',
+ 'border border-scale-200',
+ ].join(' ')}
+ >
+ <span className="text-xs text-scale-1200">
+ You need additional permissions to remove a user's authentication factors.
+ </span>
+ </div>
+ </Tooltip.Content>
+ )}
+ </Tooltip.Root>
<Tooltip.Root delayDuration={0}>
<Tooltip.Trigger className="w-full">
<Dropdown.Item
diff --git a/studio/pages/sign-in.tsx b/studio/pages/sign-in.tsx
index f6d811d6664..c9fbefdb8cc 100644
--- a/studio/pages/sign-in.tsx
+++ b/studio/pages/sign-in.tsx
@@ -1,6 +1,5 @@
import Link from 'next/link'
-import { useFlag } from 'hooks'
import { NextPageWithLayout } from 'types'
import SignInForm from 'components/interfaces/SignIn/SignInForm'
import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'
@@ -11,8 +10,6 @@ import { IS_PLATFORM } from 'lib/constants'
import { useRouter } from 'next/router'
const SignInPage: NextPageWithLayout = () => {
- const showSsoLogin = useFlag('mfaSso')
-
const router = useRouter()
useEffect(() => {
// if the dashboard is running locally, redirect straight to the projects page
@@ -25,7 +22,7 @@ const SignInPage: NextPageWithLayout = () => {
<>
<div className="flex flex-col gap-5">
<SignInWithGitHub />
- {showSsoLogin && <SignInWithSSO />}
+ <SignInWithSSO />
<div className="relative">
<div className="absolute inset-0 flex items-center">