mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 23:29:08 +03:00
* Add queries and mutations for third party auth. * Show the ThirdPartyAuth form in the auth settings. * Minor fixes to the mutations. * Add a comment for TODO. * Add all components for third party auth. * Minor fixes. * Update the firebase icons. * Update the api-types. * Fix the barrel file imports. * Make the sheets more intuitive. * Add a dialog for adding RLS policies for the firebase integration. * Hide the 3rd party auth section behind a form. * Fix a type error. * Update the wording on the Add RLS policy dialog. * Replace the sheets with dialogs. * Add fixes for the comments on github. * Minor fixes. * Fix a type error. * Make the delete integration awaitable.
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import { PermissionAction } from '@supabase/shared-types/out/constants'
|
|
|
|
import {
|
|
AdvancedAuthSettingsForm,
|
|
BasicAuthSettingsForm,
|
|
SmtpForm,
|
|
ThirdPartyAuthForm,
|
|
} from 'components/interfaces/Auth'
|
|
import SettingsLayout from 'components/layouts/ProjectSettingsLayout/SettingsLayout'
|
|
import {
|
|
ScaffoldContainer,
|
|
ScaffoldDescription,
|
|
ScaffoldHeader,
|
|
ScaffoldTitle,
|
|
} from 'components/layouts/Scaffold'
|
|
import NoPermission from 'components/ui/NoPermission'
|
|
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
|
|
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
|
|
import type { NextPageWithLayout } from 'types'
|
|
|
|
const AuthSettings: NextPageWithLayout = () => {
|
|
const isPermissionsLoaded = usePermissionsLoaded()
|
|
// TODO: check if these permissions cover third party auth as well
|
|
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
|
|
|
|
return (
|
|
<>
|
|
<ScaffoldContainer>
|
|
<ScaffoldHeader>
|
|
<ScaffoldTitle>Auth settings</ScaffoldTitle>
|
|
<ScaffoldDescription>Configure security and user session settings</ScaffoldDescription>
|
|
</ScaffoldHeader>
|
|
</ScaffoldContainer>
|
|
<ScaffoldContainer className="flex flex-col gap-10" bottomPadding>
|
|
{!isPermissionsLoaded ? (
|
|
<GenericSkeletonLoader />
|
|
) : !canReadAuthSettings ? (
|
|
<NoPermission isFullPage resourceText="access your project's authentication settings" />
|
|
) : (
|
|
<>
|
|
<BasicAuthSettingsForm />
|
|
<SmtpForm />
|
|
<AdvancedAuthSettingsForm />
|
|
<ThirdPartyAuthForm />
|
|
</>
|
|
)}
|
|
</ScaffoldContainer>
|
|
</>
|
|
)
|
|
}
|
|
|
|
AuthSettings.getLayout = (page) => <SettingsLayout>{page}</SettingsLayout>
|
|
export default AuthSettings
|