Skip to content

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

feat: Add Third Party Auth settings (#27564)

Ivan Vasilov9ac44f598568
diff --git a/apps/docs/public/img/icons/firebase-icon.svg b/apps/docs/public/img/icons/firebase-icon.svg
index 57bc1df1880..f7515edcb5f 100644
--- a/apps/docs/public/img/icons/firebase-icon.svg
+++ b/apps/docs/public/img/icons/firebase-icon.svg
@@ -1 +1,6 @@
-<svg xmlns="http://www.w3.org/2000/svg" height="64" viewBox="0 0 32 32" width="64"><path d="M19.62 11.558l-3.203 2.98-2.972-5.995 1.538-3.448c.4-.7 1.024-.692 1.414 0z" fill="#ffa000"/><path d="M13.445 8.543l2.972 5.995-11.97 11.135z" fill="#f57f17"/><path d="M23.123 7.003c.572-.55 1.164-.362 1.315.417l3.116 18.105-10.328 6.2c-.36.2-1.32.286-1.32.286s-.874-.104-1.207-.3L4.447 25.673z" fill="#ffca28"/><path d="M13.445 8.543l-8.997 17.13L8.455.638c.148-.78.592-.855.988-.167z" fill="#ffa000"/></svg>
\ No newline at end of file
+<svg width="600" height="600" viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M213.918 560.499C237.166 569.856 262.387 575.408 288.87 576.333C324.71 577.585 358.792 570.175 389.261 556.099C352.724 541.744 319.634 520.751 291.392 494.651C273.086 523.961 246.01 547.113 213.918 560.499Z" fill="#FF9100"/>
+<path d="M291.389 494.66C226.923 435.038 187.815 348.743 191.12 254.092C191.228 251.019 191.39 247.947 191.58 244.876C180.034 241.89 167.98 240.068 155.576 239.635C137.821 239.015 120.626 241.217 104.393 245.788C87.1838 275.933 76.7989 310.521 75.5051 347.569C72.1663 443.18 130.027 526.723 213.914 560.508C246.007 547.121 273.082 523.998 291.389 494.66Z" fill="#FFC400"/>
+<path d="M291.39 494.657C306.378 470.671 315.465 442.551 316.523 412.254C319.306 332.559 265.731 264.003 191.581 244.873C191.391 247.944 191.229 251.016 191.121 254.089C187.816 348.74 226.924 435.035 291.39 494.657Z" fill="#FF9100"/>
+<path d="M308.231 20.8584C266 54.6908 232.652 99.302 212.475 150.693C200.924 180.129 193.665 211.748 191.546 244.893C265.696 264.023 319.272 332.579 316.489 412.273C315.431 442.57 306.317 470.663 291.355 494.677C319.595 520.804 352.686 541.77 389.223 556.124C462.56 522.224 514.593 449.278 517.606 362.997C519.558 307.096 498.08 257.273 467.731 215.219C435.68 170.742 308.231 20.8584 308.231 20.8584Z" fill="#DD2C00"/>
+</svg>
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddIntegrationDropdown.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddIntegrationDropdown.tsx
new file mode 100644
index 00000000000..5228a5b6fae
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddIntegrationDropdown.tsx
@@ -0,0 +1,56 @@
+import { ChevronDown } from 'lucide-react'
+import Image from 'next/image'
+
+import {
+ Button,
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from 'ui'
+import {
+ INTEGRATION_TYPES,
+ getIntegrationTypeIcon,
+ getIntegrationTypeLabel,
+} from './ThirdPartyAuthForm.utils'
+
+interface AddIntegrationDropdownProps {
+ buttonText?: string
+ onSelectIntegrationType: (type: INTEGRATION_TYPES) => void
+}
+
+const Providers: INTEGRATION_TYPES[] = ['firebase', 'auth0', 'awsCognito']
+
+export const AddIntegrationDropdown = ({
+ onSelectIntegrationType,
+}: AddIntegrationDropdownProps) => {
+ return (
+ <DropdownMenu modal={false}>
+ <DropdownMenuTrigger asChild>
+ <Button type="primary" iconRight={<ChevronDown size={14} strokeWidth={1} />}>
+ Add provider
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ {Providers.map((type) => {
+ const name = getIntegrationTypeLabel(type)
+ return (
+ <DropdownMenuItem
+ key={name}
+ onClick={() => onSelectIntegrationType(type)}
+ className="flex items-center gap-x-2 p-2"
+ >
+ <Image
+ src={getIntegrationTypeIcon(type)}
+ width={16}
+ height={16}
+ alt={`${name} icon`}
+ />
+ <span>{name}</span>
+ </DropdownMenuItem>
+ )
+ })}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddRLSPolicyForFirebaseDialog.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddRLSPolicyForFirebaseDialog.tsx
new file mode 100644
index 00000000000..f1c2d25a0a5
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AddRLSPolicyForFirebaseDialog.tsx
@@ -0,0 +1,82 @@
+import { copyToClipboard } from 'lib/helpers'
+import { Check } from 'lucide-react'
+import Link from 'next/link'
+import { useEffect, useState } from 'react'
+import {
+ Button,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogSection,
+ DialogSectionSeparator,
+ DialogTitle,
+} from 'ui'
+import { SQLCodeBlock } from './SqlCodeBlock'
+
+export const AddRLSPolicyForFirebaseDialog = ({
+ projectRef,
+ firebaseProjectId,
+}: {
+ projectRef: string
+ firebaseProjectId: string
+}) => {
+ const description = `create policy
+ "Restrict access to Firebase Auth for project ID ${firebaseProjectId}"
+ on table_name
+ as restrictive
+ to authenticated using (
+ (
+ auth.jwt()->>'iss' = 'https://${projectRef}.supabase.co/auth/v1'
+ )
+ or (
+ auth.jwt()->>'iss' = 'https://securetoken.google.com/${firebaseProjectId}'
+ and auth.jwt()->>'aud' = '${firebaseProjectId}'
+ )
+);`
+
+ const [copied, setCopied] = useState(false)
+
+ useEffect(() => {
+ if (!copied) return
+ const timer = setTimeout(() => setCopied(false), 2000)
+ return () => clearTimeout(timer)
+ }, [copied])
+
+ function handleCopy(formatted: string) {
+ copyToClipboard(formatted, () => setCopied(true))
+ }
+
+ return (
+ <>
+ <DialogHeader padding={'small'}>
+ <DialogTitle>Add RLS policy</DialogTitle>
+ <DialogDescription>
+ We recommend adding a Row Level Security (RLS) policy for your Firebase JWT keys to
+ explicitly specify which tables can be accessed via the Data APIs in order to prevent
+ accidental exposure of data.
+ </DialogDescription>
+ </DialogHeader>
+ <DialogSectionSeparator />
+ <DialogSection padding={'small'}>
+ <SQLCodeBlock projectRef={projectRef!}>{[description]}</SQLCodeBlock>
+ </DialogSection>
+ <DialogFooter padding={'small'}>
+ <Button
+ type="default"
+ onClick={() => handleCopy(description)}
+ icon={copied ? <Check className="text-brand-600" /> : null}
+ >
+ {copied ? <p>Copied</p> : <p>Copy code</p>}
+ </Button>
+ <Button type="primary">
+ <Link
+ href={`/project/${projectRef}/sql/new?content=${encodeURIComponent(description)}`}
+ passHref
+ >
+ Open in SQL Editor
+ </Link>
+ </Button>
+ </DialogFooter>
+ </>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx
new file mode 100644
index 00000000000..b2bdec81d35
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx
@@ -0,0 +1,103 @@
+import { Check, ChevronsUpDown } from 'lucide-react'
+import { useState } from 'react'
+import {
+ Button,
+ CommandEmpty_Shadcn_,
+ CommandGroup_Shadcn_,
+ CommandInput_Shadcn_,
+ CommandItem_Shadcn_,
+ Command_Shadcn_,
+ FormControl_Shadcn_,
+ PopoverContent_Shadcn_,
+ PopoverTrigger_Shadcn_,
+ Popover_Shadcn_,
+ ScrollArea,
+ cn,
+} from 'ui'
+
+// copied from https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html
+export const AWS_IDP_REGIONS = [
+ 'af-south-1',
+ 'ap-northeast-1',
+ 'ap-northeast-2',
+ 'ap-northeast-3',
+ 'ap-south-1 ',
+ 'ap-south-2 ',
+ 'ap-southeast-1',
+ 'ap-southeast-2',
+ 'ap-southeast-3',
+ 'ap-southeast-4',
+ 'ca-central-1',
+ 'eu-central-1',
+ 'eu-central-2',
+ 'eu-north-1',
+ 'eu-south-1',
+ 'eu-south-2',
+ 'eu-west-1',
+ 'eu-west-2',
+ 'eu-west-3',
+ 'il-central-1',
+ 'me-central-1',
+ 'me-south-1',
+ 'sa-east-1',
+ 'us-east-1',
+ 'us-east-2',
+ 'us-gov-west-1',
+ 'us-west-1',
+ 'us-west-2',
+]
+
+export const AwsRegionSelector = ({
+ value,
+ onChange,
+}: {
+ value: string
+ onChange: (value: string) => void
+}) => {
+ const [open, setOpen] = useState(false)
+
+ return (
+ <Popover_Shadcn_ open={open} onOpenChange={setOpen}>
+ <PopoverTrigger_Shadcn_ asChild>
+ <FormControl_Shadcn_>
+ <Button
+ type="default"
+ role="combobox"
+ className={cn('w-full justify-between', !value && 'text-muted-foreground')}
+ size="small"
+ iconRight={
+ <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" strokeWidth={1} />
+ }
+ >
+ {value ?? 'Select a region'}
+ </Button>
+ </FormControl_Shadcn_>
+ </PopoverTrigger_Shadcn_>
+ <PopoverContent_Shadcn_ className="p-0" sameWidthAsTrigger>
+ <Command_Shadcn_>
+ <CommandInput_Shadcn_ placeholder="Search AWS regions..." />
+ <CommandEmpty_Shadcn_>No regions found.</CommandEmpty_Shadcn_>
+ <CommandGroup_Shadcn_>
+ <ScrollArea className="h-72">
+ {AWS_IDP_REGIONS.map((option) => (
+ <CommandItem_Shadcn_
+ value={option}
+ key={option}
+ onSelect={(currentValue) => {
+ onChange(currentValue === value ? '' : currentValue)
+ setOpen(false)
+ }}
+ >
+ <Check
+ className={cn('mr-2 h-4 w-4', option === value ? 'opacity-100' : 'opacity-0')}
+ />
+ {option}
+ </CommandItem_Shadcn_>
+ ))}
+ </ScrollArea>
+ </CommandGroup_Shadcn_>
+ </Command_Shadcn_>
+ </PopoverContent_Shadcn_>
+ </Popover_Shadcn_>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAuth0Dialog.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAuth0Dialog.tsx
new file mode 100644
index 00000000000..70d42ef2485
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAuth0Dialog.tsx
@@ -0,0 +1,182 @@
+import { zodResolver } from '@hookform/resolvers/zod'
+import { Trash } from 'lucide-react'
+import { useEffect } from 'react'
+import { SubmitHandler, useForm } from 'react-hook-form'
+import toast from 'react-hot-toast'
+import * as z from 'zod'
+
+import { useParams } from 'common'
+import { useCreateThirdPartyAuthIntegrationMutation } from 'data/third-party-auth/integration-create-mutation'
+import {
+ Button,
+ Dialog,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogSection,
+ DialogTitle,
+ FormControl_Shadcn_,
+ FormField_Shadcn_,
+ Form_Shadcn_,
+ Input_Shadcn_,
+ Separator,
+} from 'ui'
+import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
+
+interface CreateAuth0IntegrationProps {
+ visible: boolean
+ onClose: () => void
+ // TODO: Remove this if this Dialog is only used for creating.
+ onDelete: () => void
+}
+
+const FORM_ID = 'create-auth0-auth-integration-form'
+
+const FormSchema = z.object({
+ enabled: z.boolean(),
+ auth0DomainName: z
+ .string()
+ .trim()
+ .min(1)
+ .regex(/^[A-Za-z0-9-.]+$/, 'Project IDs should only have alphanumeric characters and hyphens.'), // Only allow alphanumeric characters and hyphens.
+})
+
+export const CreateAuth0IntegrationDialog = ({
+ visible,
+ onClose,
+ onDelete,
+}: CreateAuth0IntegrationProps) => {
+ // TODO: Remove this if this Dialog is only used for creating.
+ const isCreating = true
+
+ const { ref: projectRef } = useParams()
+ const { mutate: createAuthIntegration, isLoading } = useCreateThirdPartyAuthIntegrationMutation({
+ onSuccess: () => {
+ toast.success(`Successfully created a new Auth0 Auth integration.`)
+ onClose()
+ },
+ })
+
+ const form = useForm<z.infer<typeof FormSchema>>({
+ resolver: zodResolver(FormSchema),
+ defaultValues: {
+ enabled: true,
+ auth0DomainName: '',
+ },
+ })
+
+ useEffect(() => {
+ if (visible) {
+ form.reset({
+ enabled: true,
+ auth0DomainName: '',
+ })
+
+ // the form input doesn't exist when the form is reset
+ setTimeout(() => {
+ form.setFocus('auth0DomainName')
+ }, 25)
+ }
+ }, [visible])
+
+ const onSubmit: SubmitHandler<z.infer<typeof FormSchema>> = async (values) => {
+ createAuthIntegration({
+ projectRef: projectRef!,
+ oidcIssuerUrl: `https://${values.auth0DomainName}.auth0.com`,
+ })
+ }
+
+ return (
+ <Dialog open={visible} onOpenChange={() => onClose()}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle className="truncate">
+ {isCreating ? `Add new Auth0 connection` : `Update existing Auth0 connection`}
+ </DialogTitle>
+ </DialogHeader>
+ <Separator />
+ <DialogSection>
+ <Form_Shadcn_ {...form}>
+ <form id={FORM_ID} onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
+ {/* Enabled flag can't be changed for now because there's no update API call for integrations */}
+ {/* <FormField_Shadcn_
+ key="enabled"
+ control={form.control}
+ name="enabled"
+ render={({ field }) => (
+ <FormItemLayout
+ className="px-8"
+ label={`Enable Auth0 Auth Connection`}
+ layout="flex"
+ >
+ <FormControl_Shadcn_>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ disabled={field.disabled}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ <Separator /> */}
+ <p className="text-sm text-foreground-light">
+ This will enable a JWT token from your Auth0 project to access data from this
+ Supabase project.
+ </p>
+ <FormField_Shadcn_
+ key="auth0DomainName"
+ control={form.control}
+ name="auth0DomainName"
+ render={({ field }) => (
+ <FormItemLayout label="Auth0 domain name">
+ <div className="flex flex-row">
+ <Button
+ type="default"
+ size="small"
+ className="px-2 text-foreground-light rounded-r-none"
+ onClick={() => form.setFocus('auth0DomainName')}
+ >
+ https://
+ </Button>
+ <FormControl_Shadcn_>
+ <Input_Shadcn_
+ className="border-l-0 rounded-none border-r-0 z-50"
+ {...field}
+ />
+ </FormControl_Shadcn_>
+ <Button
+ type="default"
+ size="small"
+ className="px-2 text-foreground-light rounded-l-none"
+ onClick={() => form.setFocus('auth0DomainName')}
+ >
+ .auth0.com
+ </Button>
+ </div>
+ </FormItemLayout>
+ )}
+ />
+ </form>
+ </Form_Shadcn_>
+ </DialogSection>
+ <DialogFooter>
+ {!isCreating && (
+ <div className="flex-1">
+ <Button type="danger" onClick={() => onDelete()} icon={<Trash />}>
+ Remove connection
+ </Button>
+ </div>
+ )}
+
+ <Button disabled={isLoading} type="default" onClick={() => onClose()}>
+ Cancel
+ </Button>
+ <Button form={FORM_ID} htmlType="submit" disabled={isLoading} loading={isLoading}>
+ {isCreating ? 'Create connection' : 'Update connection'}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAwsCognitoAuthDialog.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAwsCognitoAuthDialog.tsx
new file mode 100644
index 00000000000..7b05e96b58b
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateAwsCognitoAuthDialog.tsx
@@ -0,0 +1,192 @@
+import { zodResolver } from '@hookform/resolvers/zod'
+import { Trash } from 'lucide-react'
+import { useEffect } from 'react'
+import { SubmitHandler, useForm } from 'react-hook-form'
+import toast from 'react-hot-toast'
+import * as z from 'zod'
+
+import { useParams } from 'common'
+import { useCreateThirdPartyAuthIntegrationMutation } from 'data/third-party-auth/integration-create-mutation'
+import {
+ Button,
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogSection,
+ DialogTitle,
+ FormControl_Shadcn_,
+ FormField_Shadcn_,
+ Form_Shadcn_,
+ Input_Shadcn_,
+ Separator,
+} from 'ui'
+import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
+import { AwsRegionSelector } from './AwsRegionSelector'
+
+interface CreateAwsCognitoAuthIntegrationProps {
+ visible: boolean
+ onClose: () => void
+ // TODO: Remove this if this Dialog is only used for creating.
+ onDelete: () => void
+}
+
+const FORM_ID = 'create-aws-cognito-auth-integration-form'
+
+const FormSchema = z.object({
+ enabled: z.boolean(),
+ awsCognitoUserPoolId: z
+ .string()
+ .trim()
+ .min(1)
+ .regex(/^[A-Za-z0-9-_]+$/, 'The project ID contains invalid characters.'), // Only allow alphanumeric characters and hyphens.
+ awsRegion: z.string(),
+})
+
+export const CreateAwsCognitoAuthIntegrationDialog = ({
+ visible,
+ onClose,
+ onDelete,
+}: CreateAwsCognitoAuthIntegrationProps) => {
+ // TODO: Remove this if this Dialog is only used for creating.
+ const isCreating = true
+
+ const { ref: projectRef } = useParams()
+ const { mutate: createAuthIntegration, isLoading } = useCreateThirdPartyAuthIntegrationMutation({
+ onSuccess: () => {
+ toast.success(`Successfully created a new AWS Cognito Auth integration.`)
+ onClose()
+ },
+ })
+
+ const form = useForm<z.infer<typeof FormSchema>>({
+ resolver: zodResolver(FormSchema),
+ defaultValues: {
+ enabled: true,
+ awsCognitoUserPoolId: '',
+ awsRegion: 'us-east-1',
+ },
+ })
+
+ useEffect(() => {
+ if (visible) {
+ form.reset({
+ enabled: true,
+ awsCognitoUserPoolId: '',
+ awsRegion: 'us-east-1',
+ })
+ // the form input doesn't exist when the form is reset
+ setTimeout(() => {
+ form.setFocus('awsCognitoUserPoolId')
+ }, 25)
+ }
+ }, [visible])
+
+ const onSubmit: SubmitHandler<z.infer<typeof FormSchema>> = async (values) => {
+ createAuthIntegration({
+ projectRef: projectRef!,
+ oidcIssuerUrl: `https://cognito-idp.${values.awsRegion}.amazonaws.com/${values.awsCognitoUserPoolId}`,
+ })
+ }
+
+ const awsRegion = form.watch('awsRegion')
+
+ return (
+ <Dialog open={visible} onOpenChange={() => onClose()}>
+ <DialogContent size="large">
+ <DialogHeader>
+ <DialogTitle className="truncate">
+ {isCreating
+ ? `Add new AWS Cognito Auth connection`
+ : `Update existing AWS Cognito Auth connection`}
+ </DialogTitle>
+ <DialogDescription>
+ By adding an AWS Cognito Auth connection, you can authenticate users using AWS Cognito
+ User Pools.
+ </DialogDescription>
+ </DialogHeader>
+ <Separator />
+ <DialogSection>
+ <Form_Shadcn_ {...form}>
+ <form id={FORM_ID} onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
+ {/* Enabled flag can't be changed for now because there's no update API call for integrations */}
+ {/* <FormField_Shadcn_
+ key="enabled"
+ control={form.control}
+ name="enabled"
+ render={({ field }) => (
+ <FormItemLayout
+ className="px-8"
+ label={`Enable AWS Cognito Auth Connection`}
+ layout="flex"
+ >
+ <FormControl_Shadcn_>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ disabled={field.disabled}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ <Separator /> */}
+ <p className="text-sm text-foreground-light">
+ This will enable a JWT token from AWS Cognito project to access data from this
+ Supabase project.
+ </p>
+ <FormField_Shadcn_
+ key="awsCognitoUserPoolId"
+ control={form.control}
+ name="awsCognitoUserPoolId"
+ render={({ field }) => (
+ <FormItemLayout label="AWS Cognito User Pool ID">
+ <div className="flex flex-row">
+ <Button
+ type="default"
+ size="small"
+ className="px-2 text-foreground-light rounded-r-none"
+ onClick={() => form.setFocus('awsCognitoUserPoolId')}
+ >
+ https://cognito-idp.{awsRegion}.amazonaws.com/
+ </Button>
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ className="rounded-l-none border-l-0 z-50" {...field} />
+ </FormControl_Shadcn_>
+ </div>
+ </FormItemLayout>
+ )}
+ />
+ <FormField_Shadcn_
+ control={form.control}
+ name="awsRegion"
+ render={({ field }) => (
+ <FormItemLayout label="AWS Region">
+ <AwsRegionSelector value={field.value} onChange={field.onChange} />
+ </FormItemLayout>
+ )}
+ />
+ </form>
+ </Form_Shadcn_>
+ </DialogSection>
+ <DialogFooter>
+ {!isCreating && (
+ <div className="flex-1">
+ <Button type="danger" onClick={() => onDelete()} icon={<Trash />}>
+ Remove connection
+ </Button>
+ </div>
+ )}
+
+ <Button disabled={isLoading} type="default" onClick={() => onClose()}>
+ Cancel
+ </Button>
+ <Button form={FORM_ID} htmlType="submit" disabled={isLoading} loading={isLoading}>
+ {isCreating ? 'Create connection' : 'Update connection'}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateFirebaseAuthDialog.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateFirebaseAuthDialog.tsx
new file mode 100644
index 00000000000..1a14d40b2e7
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/CreateFirebaseAuthDialog.tsx
@@ -0,0 +1,179 @@
+import { zodResolver } from '@hookform/resolvers/zod'
+import { AlertTriangle, Trash } from 'lucide-react'
+import { useEffect } from 'react'
+import { SubmitHandler, useForm } from 'react-hook-form'
+import toast from 'react-hot-toast'
+import * as z from 'zod'
+
+import { useParams } from 'common'
+import { useCreateThirdPartyAuthIntegrationMutation } from 'data/third-party-auth/integration-create-mutation'
+import {
+ AlertDescription_Shadcn_,
+ AlertTitle_Shadcn_,
+ Alert_Shadcn_,
+ Button,
+ Dialog,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogSection,
+ DialogTitle,
+ FormControl_Shadcn_,
+ FormField_Shadcn_,
+ Form_Shadcn_,
+ Input_Shadcn_,
+ Separator,
+} from 'ui'
+import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
+
+interface CreateFirebaseAuthIntegrationProps {
+ visible: boolean
+ onClose: () => void
+ // TODO: Remove this if this Dialog is only used for creating.
+ onDelete: () => void
+}
+
+const FORM_ID = 'create-firebase-auth-integration-form'
+
+const FormSchema = z.object({
+ enabled: z.boolean(),
+ firebaseProjectId: z
+ .string()
+ .trim()
+ .min(1)
+ .regex(/^[A-Za-z0-9-]+$/, 'The project ID contains invalid characters.'), // Only allow alphanumeric characters and hyphens.
+})
+
+export const CreateFirebaseAuthIntegrationDialog = ({
+ visible,
+ onClose,
+ onDelete,
+}: CreateFirebaseAuthIntegrationProps) => {
+ // TODO: Remove this if this Dialog is only used for creating.
+ const isCreating = true
+
+ const { ref: projectRef } = useParams()
+ const { mutate: createAuthIntegration, isLoading } = useCreateThirdPartyAuthIntegrationMutation({
+ onSuccess: () => {
+ toast.success(`Successfully created a new Firebase Auth integration.`)
+ onClose()
+ },
+ })
+
+ const form = useForm<z.infer<typeof FormSchema>>({
+ resolver: zodResolver(FormSchema),
+ defaultValues: {
+ enabled: true,
+ firebaseProjectId: '',
+ },
+ })
+
+ useEffect(() => {
+ if (visible) {
+ form.reset({
+ enabled: true,
+ firebaseProjectId: '',
+ })
+ // the form input doesn't exist when the form is reset
+ setTimeout(() => {
+ form.setFocus('firebaseProjectId')
+ }, 25)
+ }
+ }, [visible])
+
+ const onSubmit: SubmitHandler<z.infer<typeof FormSchema>> = async (values) => {
+ createAuthIntegration({
+ projectRef: projectRef!,
+ oidcIssuerUrl: `https://securetoken.google.com/${values.firebaseProjectId}`,
+ })
+ }
+
+ return (
+ <Dialog open={visible} onOpenChange={() => onClose()}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle className="truncate">
+ {isCreating
+ ? `Add new Firebase Auth connection`
+ : `Update existing Firebase Auth connection`}
+ </DialogTitle>
+ </DialogHeader>
+
+ <Separator />
+ <DialogSection>
+ <Form_Shadcn_ {...form}>
+ <form id={FORM_ID} onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
+ {/* Enabled flag can't be changed for now because there's no update API call for integrations */}
+ {/* <FormField_Shadcn_
+ key="enabled"
+ control={form.control}
+ name="enabled"
+ render={({ field }) => (
+ <FormItemLayout
+ className="px-8"
+ label={`Enable Firebase Auth Connection`}
+ layout="flex"
+ >
+ <FormControl_Shadcn_>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ disabled={field.disabled}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ <Separator /> */}
+
+ <p className="text-sm text-foreground-light">
+ This will enable a JWT token from a specific Firebase project to access data from
+ this Supabase project.
+ </p>
+ <FormField_Shadcn_
+ key="firebaseProjectId"
+ control={form.control}
+ name="firebaseProjectId"
+ render={({ field }) => (
+ <FormItemLayout label="Firebase Auth Project ID">
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ {...field} />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+
+ <Alert_Shadcn_ variant="warning">
+ <AlertTriangle strokeWidth={2} />
+ <AlertTitle_Shadcn_>
+ This connection requires a Row Level Security (RLS) policy
+ </AlertTitle_Shadcn_>
+ <AlertDescription_Shadcn_>
+ You will need to manually add a RLS policy after creating this Firebase
+ connection. Otherwise, the Supabase project will be accessible to anyone with a
+ valid Firebase JWT token.
+ </AlertDescription_Shadcn_>
+ </Alert_Shadcn_>
+ </form>
+ </Form_Shadcn_>
+ </DialogSection>
+ <DialogFooter>
+ {!isCreating && (
+ <div className="flex-1">
+ <Button type="danger" onClick={() => onDelete()} icon={<Trash />}>
+ Remove connection
+ </Button>
+ </div>
+ )}
+
+ <Button disabled={isLoading} type="default" onClick={() => onClose()}>
+ Cancel
+ </Button>
+ <Button form={FORM_ID} htmlType="submit" disabled={isLoading} loading={isLoading}>
+ {isCreating ? 'Create connection' : 'Update connection'}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx
new file mode 100644
index 00000000000..5dfea21b684
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx
@@ -0,0 +1,214 @@
+import { ExclamationCircleIcon } from '@heroicons/react/16/solid'
+import { Check } from 'lucide-react'
+import Image from 'next/image'
+
+import { useParams } from 'common'
+import { ThirdPartyAuthIntegration } from 'data/third-party-auth/integrations-query'
+import { Badge, Button, Dialog, DialogContent, DialogTrigger } from 'ui'
+import { AddRLSPolicyForFirebaseDialog } from './AddRLSPolicyForFirebaseDialog'
+import { AWS_IDP_REGIONS } from './AwsRegionSelector'
+import {
+ getIntegrationType,
+ getIntegrationTypeIcon,
+ getIntegrationTypeLabel,
+ INTEGRATION_TYPES,
+} from './ThirdPartyAuthForm.utils'
+
+interface IntegrationCardProps {
+ integration: ThirdPartyAuthIntegration
+ canUpdateConfig: boolean
+ onDelete: () => void
+}
+
+export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
+ switch (type) {
+ case 'firebase':
+ return (
+ <>
+ Allow users to use Supabase with Firebase project. You'll need to setup RLS policies for
+ all tables that you want to access with a Firebase JWT token. Additionally, you'll need to
+ add custom code to set the <code>authenticated</code> role to all your present and future
+ users. You can read more in the{' '}
+ <a
+ className="hover:decoration-brand underline hover:text-foreground transition"
+ href="https://supabase.com/docs/guides/auth"
+ >
+ documentation
+ </a>
+ .
+ </>
+ )
+
+ case 'auth0':
+ return (
+ <>
+ Allow users to use Supabase with Auth0 project. Additional setup may be required. You can
+ read more in the{' '}
+ <a
+ className="hover:decoration-brand underline hover:text-foreground transition"
+ href="https://supabase.com/docs/guides/auth"
+ >
+ documentation
+ </a>
+ .
+ </>
+ )
+ case 'awsCognito':
+ return (
+ <>
+ Allow users to use Supabase with AWS Cognito project. Additional setup may be required.
+ You can read more in the{' '}
+ <a
+ className="hover:decoration-brand underline hover:text-foreground transition"
+ href="https://supabase.com/docs/guides/auth"
+ >
+ documentation
+ </a>
+ .
+ </>
+ )
+ case 'custom':
+ default:
+ return 'Custom'
+ }
+}
+
+export const IntegrationTypeContent = ({
+ type,
+ integration,
+}: {
+ type: INTEGRATION_TYPES
+ integration: ThirdPartyAuthIntegration
+}) => {
+ switch (type) {
+ case 'firebase': {
+ const projectName =
+ integration.oidc_issuer_url?.replace('https://securetoken.google.com/', '') || ''
+
+ return (
+ <div className="text-sm flex flex-row gap-x-4">
+ <span className="text-foreground-light w-36">Firebase Project ID</span>
+ <span className="text-foreground">{projectName}</span>
+ </div>
+ )
+ }
+ case 'auth0':
+ const domainName =
+ integration.oidc_issuer_url?.replace('https://', '').replace('.auth0.com', '') || ''
+
+ return (
+ <div className="text-sm flex flex-row gap-x-4">
+ <span className="text-foreground-light w-36">Auth0 Domain Name</span>
+ <span className="text-foreground">{domainName}</span>
+ </div>
+ )
+ case 'awsCognito': {
+ const region =
+ integration.oidc_issuer_url?.split('.').filter((s) => AWS_IDP_REGIONS.includes(s))[0] || ''
+
+ const userPoolId =
+ integration.oidc_issuer_url?.split('/').filter((s) => s.startsWith(region || ''))[0] || ''
+
+ return (
+ <div className="text-sm flex flex-col gap-y-2">
+ <div className="flex flex-row gap-x-4">
+ <span className="text-foreground-light w-36">Region</span>
+ <span className="text-foreground">{region}</span>
+ </div>
+ <div className="flex flex-row gap-x-4">
+ <span className="text-foreground-light w-36">User Pool ID</span>
+ <span className="text-foreground">{userPoolId}</span>
+ </div>
+ </div>
+ )
+ }
+
+ case 'custom':
+ default:
+ return <>Custom</>
+ }
+}
+
+export const IntegrationCard = ({
+ integration,
+ canUpdateConfig,
+ onDelete,
+}: IntegrationCardProps) => {
+ const { ref: projectRef } = useParams()
+ let type = getIntegrationType(integration)
+
+ if (type === 'custom') {
+ return null
+ }
+
+ return (
+ <>
+ <div className="bg-surface-100 border overflow-hidden shadow px-5 py-4 flex flex-row first:rounded-t-md last:rounded-b-md space-x-4">
+ <div className="py-1">
+ <Image src={getIntegrationTypeIcon(type)} width={21} height={21} alt={`${type} icon`} />
+ </div>
+ <div className="flex flex-col flex-0 overflow-y-auto w-full gap-y-4">
+ <div className="text-sm flex flex-col">
+ <span className="text-foreground">{getIntegrationTypeLabel(type)}</span>
+ <div className="text-foreground-lighter">{getIntegrationTypeDescription(type)}</div>
+ </div>
+
+ <IntegrationTypeContent type={type} integration={integration} />
+ <div>
+ {/* TODO: this should be a configure integration where it would show the sheet and the user can disable or delete the integration
+ but there's no "edit integration" endpoing for now. */}
+ <Button type="danger" disabled={!canUpdateConfig} onClick={() => onDelete()}>
+ Delete integration
+ </Button>
+ </div>
+ </div>
+ <div className="flex-1">
+ {true ? (
+ <Badge className="space-x-1" size="large" variant="brand">
+ <div className="h-3.5 w-3.5 bg-brand rounded-full flex justify-center items-center">
+ <Check className="h-2 w-2 text-background-overlay" strokeWidth={6} />
+ </div>
+ <span>Enabled</span>
+ </Badge>
+ ) : (
+ <Badge variant="warning" size="large">
+ <span>Disabled</span>
+ </Badge>
+ )}
+ </div>
+ </div>
+ {type === 'firebase' ? (
+ <div className="bg-alternative border overflow-hidden shadow pl-11 pr-4 py-5 flex flex-row space-x-4">
+ <div className="bg-warning h-5 w-5 text-black flex items-center justify-center rounded-md">
+ <ExclamationCircleIcon className="h-4 w-4 text-black" />
+ </div>
+ <div className="text-sm space-y-4">
+ <div className="space-y-1">
+ <p className="text-foreground">Firebase provider uses a custom RLS policy</p>
+ <p className="text-foreground-light">
+ Be aware that this provider requires an RLS policy to correctly work.
+ </p>
+ </div>
+
+ <Dialog>
+ <DialogTrigger asChild>
+ <Button type="warning" size="tiny">
+ Insert policy
+ </Button>
+ </DialogTrigger>
+ <DialogContent size="xlarge">
+ <AddRLSPolicyForFirebaseDialog
+ projectRef={projectRef!}
+ firebaseProjectId={
+ integration.oidc_issuer_url?.replace('https://securetoken.google.com/', '') ||
+ ''
+ }
+ />
+ </DialogContent>
+ </Dialog>
+ </div>
+ </div>
+ ) : null}
+ </>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/SqlCodeBlock.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/SqlCodeBlock.tsx
new file mode 100644
index 00000000000..31a62fa0486
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/SqlCodeBlock.tsx
@@ -0,0 +1,38 @@
+import { format } from 'sql-formatter'
+import { CodeBlock, cn } from 'ui'
+
+interface SQLCodeBlockProps {
+ children: string[]
+ projectRef: string
+}
+
+export const SQLCodeBlock = ({ children }: SQLCodeBlockProps) => {
+ let formatted = (children || [''])[0]
+ try {
+ formatted = format(formatted, {
+ language: 'postgresql',
+ keywordCase: 'upper',
+ })
+ } catch {}
+
+ if (formatted.length === 0) {
+ return null
+ }
+
+ return (
+ <pre className="rounded-md relative group">
+ <CodeBlock
+ value={formatted}
+ language="sql"
+ className={cn(
+ '!py-3 !px-3.5 prose dark:prose-dark transition max-w-full',
+ // change the look of the code block. The flex hack is so that the code is wrapping since
+ // every word is a separate span
+ '[&>code]:m-0 [&>code>span]:flex [&>code>span]:flex-wrap'
+ )}
+ hideCopy
+ hideLineNumbers
+ />
+ </pre>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/ThirdPartyAuthForm.utils.ts b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/ThirdPartyAuthForm.utils.ts
new file mode 100644
index 00000000000..9987f435c5b
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/ThirdPartyAuthForm.utils.ts
@@ -0,0 +1,51 @@
+import { ThirdPartyAuthIntegration } from 'data/third-party-auth/integrations-query'
+import { BASE_PATH } from 'lib/constants'
+
+export const INTEGRATION_TYPES = ['firebase', 'auth0', 'awsCognito', 'custom'] as const
+export type INTEGRATION_TYPES = (typeof INTEGRATION_TYPES)[number]
+
+export const getIntegrationType = (integration?: ThirdPartyAuthIntegration): INTEGRATION_TYPES => {
+ if (
+ integration?.oidc_issuer_url &&
+ integration?.oidc_issuer_url.startsWith('https://securetoken.google.com/')
+ ) {
+ return 'firebase'
+ }
+ if (integration?.oidc_issuer_url && integration?.oidc_issuer_url.includes('amazonaws.com')) {
+ return 'awsCognito'
+ }
+
+ if (integration?.oidc_issuer_url && integration?.oidc_issuer_url.includes('auth0.com')) {
+ return 'auth0'
+ }
+
+ return 'custom'
+}
+
+export const getIntegrationTypeLabel = (type: INTEGRATION_TYPES) => {
+ switch (type) {
+ case 'firebase':
+ return 'Firebase'
+ case 'auth0':
+ return 'Auth0'
+ case 'awsCognito':
+ return 'AWS Cognito'
+ case 'custom':
+ default:
+ return 'Custom'
+ }
+}
+
+export const getIntegrationTypeIcon = (type: INTEGRATION_TYPES) => {
+ switch (type) {
+ case 'firebase':
+ return `${BASE_PATH}/img/icons/firebase-icon.svg`
+ case 'auth0':
+ return `${BASE_PATH}/img/icons/auth0-icon.svg`
+ case 'awsCognito':
+ return `${BASE_PATH}/img/icons/cognito-icon.svg`
+ case 'custom':
+ default:
+ return `${BASE_PATH}/img/icons/cognito-icon.svg`
+ }
+}
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx
new file mode 100644
index 00000000000..79c73d4313c
--- /dev/null
+++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx
@@ -0,0 +1,164 @@
+import { PermissionAction } from '@supabase/shared-types/out/constants'
+import { Loader2 } from 'lucide-react'
+import { useState } from 'react'
+import toast from 'react-hot-toast'
+
+import { useParams } from 'common'
+import AlertError from 'components/ui/AlertError'
+import { FormHeader } from 'components/ui/Forms/FormHeader'
+import { useDeleteThirdPartyAuthIntegrationMutation } from 'data/third-party-auth/integration-delete-mutation'
+import {
+ ThirdPartyAuthIntegration,
+ useThirdPartyAuthIntegrationsQuery,
+} from 'data/third-party-auth/integrations-query'
+import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
+import { useFlag } from 'hooks/ui/useFlag'
+import { cn } from 'ui'
+import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
+import { AddIntegrationDropdown } from './AddIntegrationDropdown'
+import { CreateAuth0IntegrationDialog } from './CreateAuth0Dialog'
+import { CreateAwsCognitoAuthIntegrationDialog } from './CreateAwsCognitoAuthDialog'
+import { CreateFirebaseAuthIntegrationDialog } from './CreateFirebaseAuthDialog'
+import { IntegrationCard } from './IntegrationCard'
+import {
+ INTEGRATION_TYPES,
+ getIntegrationType,
+ getIntegrationTypeLabel,
+} from './ThirdPartyAuthForm.utils'
+
+export const ThirdPartyAuthForm = () => {
+ const thirdPartyAuthEnabled = useFlag('thirdPartyAuth')
+ const { ref: projectRef } = useParams()
+ const {
+ data: integrationsData,
+ isLoading,
+ isError,
+ isSuccess,
+ error,
+ } = useThirdPartyAuthIntegrationsQuery({ projectRef })
+ const integrations = integrationsData || []
+
+ const [selectedIntegration, setSelectedIntegration] = useState<INTEGRATION_TYPES>()
+ const [selectedIntegrationForDeletion, setSelectedIntegrationForDeletion] =
+ useState<ThirdPartyAuthIntegration>()
+
+ const { mutateAsync: deleteIntegration } = useDeleteThirdPartyAuthIntegrationMutation()
+ const canUpdateConfig = useCheckPermissions(PermissionAction.UPDATE, 'custom_config_gotrue')
+
+ if (!thirdPartyAuthEnabled) {
+ return null
+ }
+
+ if (isError) {
+ return (
+ <AlertError
+ error={error}
+ subject="Failed to retrieve auth configuration for Third Party Auth Integrations"
+ />
+ )
+ }
+
+ return (
+ <div className="pb-4">
+ <FormHeader
+ title="Third Party Auth"
+ description="Use third-party authentication (TPA) systems based on JWTs to access your project."
+ actions={
+ integrations.length !== 0 ? (
+ <AddIntegrationDropdown onSelectIntegrationType={setSelectedIntegration} />
+ ) : null
+ }
+ />
+
+ {isLoading && (
+ <div
+ className={cn(
+ 'border rounded border-default px-20 py-16 flex flex-col items-center justify-center space-y-4'
+ )}
+ >
+ <Loader2 size={24} className="animate-spin" />
+ </div>
+ )}
+
+ {isSuccess ? (
+ integrations.length === 0 ? (
+ <div
+ className={cn(
+ 'border rounded border-default px-20 py-16 flex flex-col items-center justify-center space-y-4'
+ )}
+ >
+ <p className="text-sm text-foreground-light">No integrations configured yet</p>
+ <AddIntegrationDropdown
+ buttonText="Add a new integration"
+ onSelectIntegrationType={setSelectedIntegration}
+ />
+ </div>
+ ) : (
+ <div className="-space-y-px">
+ {integrations.map((integration) => {
+ return (
+ <IntegrationCard
+ key={integration.id}
+ integration={integration}
+ canUpdateConfig={canUpdateConfig}
+ onDelete={() => {
+ setSelectedIntegrationForDeletion(integration)
+ }}
+ />
+ )
+ })}
+ </div>
+ )
+ ) : null}
+
+ <CreateFirebaseAuthIntegrationDialog
+ visible={selectedIntegration === 'firebase'}
+ onDelete={() => {}}
+ onClose={() => setSelectedIntegration(undefined)}
+ />
+
+ <CreateAwsCognitoAuthIntegrationDialog
+ visible={selectedIntegration === 'awsCognito'}
+ onDelete={() => {}}
+ onClose={() => setSelectedIntegration(undefined)}
+ />
+
+ <CreateAuth0IntegrationDialog
+ visible={selectedIntegration === 'auth0'}
+ onDelete={() => {}}
+ onClose={() => setSelectedIntegration(undefined)}
+ />
+
+ <ConfirmationModal
+ visible={!!selectedIntegrationForDeletion}
+ variant="destructive"
+ title="Confirm to delete"
+ confirmLabel="Delete"
+ confirmLabelLoading="Deleting"
+ onCancel={() => setSelectedIntegrationForDeletion(undefined)}
+ onConfirm={async () => {
+ if (!selectedIntegrationForDeletion) {
+ return
+ }
+ const type = getIntegrationType(selectedIntegrationForDeletion)
+ try {
+ await deleteIntegration({
+ projectRef: projectRef!,
+ tpaId: selectedIntegrationForDeletion.id,
+ })
+ toast.success(`Successfully deleted ${getIntegrationTypeLabel(type)}.`)
+ setSelectedIntegrationForDeletion(undefined)
+ setSelectedIntegration(undefined)
+ } catch (error) {
+ toast.error(`Failed to delete ${getIntegrationTypeLabel(type)}.`)
+ console.error(error)
+ }
+ }}
+ >
+ <p className="py-4 text-sm text-foreground-light">
+ {`Are you sure you want to delete the ${getIntegrationTypeLabel(getIntegrationType(selectedIntegrationForDeletion))} integration?`}
+ </p>
+ </ConfirmationModal>
+ </div>
+ )
+}
diff --git a/apps/studio/components/interfaces/Auth/index.tsx b/apps/studio/components/interfaces/Auth/index.tsx
index 96f04d7eee5..1c63343165a 100644
--- a/apps/studio/components/interfaces/Auth/index.tsx
+++ b/apps/studio/components/interfaces/Auth/index.tsx
@@ -1,5 +1,6 @@
+export { default as AdvancedAuthSettingsForm } from './AdvancedAuthSettingsForm/AdvancedAuthSettingsForm'
export { default as AuthProvidersForm } from './AuthProvidersForm/AuthProvidersForm'
+export { default as BasicAuthSettingsForm } from './BasicAuthSettingsForm/BasicAuthSettingsForm'
export { default as EmailTemplates } from './EmailTemplates/EmailTemplates'
export { default as SmtpForm } from './SmtpForm/SmtpForm'
-export { default as BasicAuthSettingsForm } from './BasicAuthSettingsForm/BasicAuthSettingsForm'
-export { default as AdvancedAuthSettingsForm } from './AdvancedAuthSettingsForm/AdvancedAuthSettingsForm'
+export { ThirdPartyAuthForm } from './ThirdPartyAuthForm'
diff --git a/apps/studio/components/interfaces/Settings/General/General.tsx b/apps/studio/components/interfaces/Settings/General/General.tsx
index a55c1d038ae..546e772d197 100644
--- a/apps/studio/components/interfaces/Settings/General/General.tsx
+++ b/apps/studio/components/interfaces/Settings/General/General.tsx
@@ -37,7 +37,7 @@ const General = () => {
// Also doubles up as a feature flag to enable display of the related alert,
// another dedicated flag would be redundant.
- const v2AnnouncementUrl = useFlag('v2AnnouncementUrl')
+ const v2AnnouncementUrl = useFlag('v2AnnouncementUrl') as string
const v2MaintenanceWindow = project?.v2MaintenanceWindow
const v2MaintenanceDate = v2MaintenanceWindow?.start
diff --git a/apps/studio/data/third-party-auth/integration-create-mutation.ts b/apps/studio/data/third-party-auth/integration-create-mutation.ts
new file mode 100644
index 00000000000..9bfe4541eb2
--- /dev/null
+++ b/apps/studio/data/third-party-auth/integration-create-mutation.ts
@@ -0,0 +1,67 @@
+import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
+import toast from 'react-hot-toast'
+
+import { handleError, post } from 'data/fetchers'
+import type { ResponseError } from 'types'
+import { keys } from './keys'
+
+export type CreateThirdPartyAuthVariables = {
+ projectRef: string
+ customJwks?: Record<string, never>
+ jwksUrl?: string
+ oidcIssuerUrl?: string
+}
+
+export async function createThirdPartyIntegration({
+ projectRef,
+ customJwks,
+ jwksUrl,
+ oidcIssuerUrl,
+}: CreateThirdPartyAuthVariables) {
+ const { data, error } = await post(`/v1/projects/{ref}/config/auth/third-party-auth`, {
+ params: {
+ path: {
+ ref: projectRef,
+ },
+ },
+ body: {
+ custom_jwks: customJwks,
+ jwks_url: jwksUrl,
+ oidc_issuer_url: oidcIssuerUrl,
+ },
+ })
+ if (error) handleError(error)
+
+ return data
+}
+
+type ThirdPartyIntegrationCreateData = Awaited<ReturnType<typeof createThirdPartyIntegration>>
+
+export const useCreateThirdPartyAuthIntegrationMutation = ({
+ onSuccess,
+ onError,
+ ...options
+}: Omit<
+ UseMutationOptions<ThirdPartyIntegrationCreateData, ResponseError, CreateThirdPartyAuthVariables>,
+ 'mutationFn'
+> = {}) => {
+ const queryClient = useQueryClient()
+ return useMutation<ThirdPartyIntegrationCreateData, ResponseError, CreateThirdPartyAuthVariables>(
+ (vars) => createThirdPartyIntegration(vars),
+ {
+ async onSuccess(data, variables, context) {
+ const { projectRef } = variables
+ await queryClient.invalidateQueries(keys.integrations(projectRef))
+ await onSuccess?.(data, variables, context)
+ },
+ async onError(data, variables, context) {
+ if (onError === undefined) {
+ toast.error(`Failed to create third party auth integration: ${data.message}`)
+ } else {
+ onError(data, variables, context)
+ }
+ },
+ ...options,
+ }
+ )
+}
diff --git a/apps/studio/data/third-party-auth/integration-delete-mutation.ts b/apps/studio/data/third-party-auth/integration-delete-mutation.ts
new file mode 100644
index 00000000000..5675fe9210f
--- /dev/null
+++ b/apps/studio/data/third-party-auth/integration-delete-mutation.ts
@@ -0,0 +1,63 @@
+import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
+import toast from 'react-hot-toast'
+
+import { del, handleError } from 'data/fetchers'
+import type { ResponseError } from 'types'
+import { keys } from './keys'
+
+export type DeleteThirdPartyAuthIntegrationVariables = {
+ projectRef: string
+ tpaId: string
+}
+
+export async function deleteThirdPartyIntegration({
+ projectRef,
+ tpaId,
+}: DeleteThirdPartyAuthIntegrationVariables) {
+ const { data, error } = await del('/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}', {
+ params: {
+ path: {
+ ref: projectRef,
+ tpa_id: tpaId,
+ },
+ },
+ })
+ if (error) handleError(error)
+ return data
+}
+
+type DeleteThirdPartyAuthIntegrationData = Awaited<ReturnType<typeof deleteThirdPartyIntegration>>
+
+export const useDeleteThirdPartyAuthIntegrationMutation = ({
+ onSuccess,
+ onError,
+ ...options
+}: Omit<
+ UseMutationOptions<
+ DeleteThirdPartyAuthIntegrationData,
+ ResponseError,
+ DeleteThirdPartyAuthIntegrationVariables
+ >,
+ 'mutationFn'
+> = {}) => {
+ const queryClient = useQueryClient()
+ return useMutation<
+ DeleteThirdPartyAuthIntegrationData,
+ ResponseError,
+ DeleteThirdPartyAuthIntegrationVariables
+ >((vars) => deleteThirdPartyIntegration(vars), {
+ async onSuccess(data, variables, context) {
+ const { projectRef } = variables
+ await queryClient.invalidateQueries(keys.integrations(projectRef))
+ await onSuccess?.(data, variables, context)
+ },
+ async onError(data, variables, context) {
+ if (onError === undefined) {
+ toast.error(`Failed to delete third party auth integration: ${data.message}`)
+ } else {
+ onError(data, variables, context)
+ }
+ },
+ ...options,
+ })
+}
diff --git a/apps/studio/data/third-party-auth/integrations-query.ts b/apps/studio/data/third-party-auth/integrations-query.ts
new file mode 100644
index 00000000000..19b36bbd27a
--- /dev/null
+++ b/apps/studio/data/third-party-auth/integrations-query.ts
@@ -0,0 +1,46 @@
+import { useQuery, UseQueryOptions } from '@tanstack/react-query'
+import { components } from 'api-types'
+import { get, handleError } from 'data/fetchers'
+import type { ResponseError } from 'types'
+import { keys } from './keys'
+
+export type GetThirdPartyAuthIntegrationsVariables = {
+ projectRef?: string
+}
+
+export type ThirdPartyAuthIntegration = components['schemas']['ThirdPartyAuth']
+
+export async function getThirdPartyAuthIntegrations(
+ { projectRef }: GetThirdPartyAuthIntegrationsVariables,
+ signal?: AbortSignal
+) {
+ if (!projectRef) throw new Error('projectRef is required')
+
+ const { data, error } = await get('/v1/projects/{ref}/config/auth/third-party-auth', {
+ params: { path: { ref: projectRef } },
+ signal,
+ })
+
+ if (error) handleError(error)
+ return data
+}
+
+export type ThirdPartyAuthIntegrationsData = Awaited<
+ ReturnType<typeof getThirdPartyAuthIntegrations>
+>
+
+export const useThirdPartyAuthIntegrationsQuery = <TData = ThirdPartyAuthIntegrationsData>(
+ { projectRef }: GetThirdPartyAuthIntegrationsVariables,
+ {
+ enabled = true,
+ ...options
+ }: UseQueryOptions<ThirdPartyAuthIntegrationsData, ResponseError, TData> = {}
+) =>
+ useQuery<ThirdPartyAuthIntegrationsData, ResponseError, TData>(
+ keys.integrations(projectRef),
+ ({ signal }) => getThirdPartyAuthIntegrations({ projectRef }, signal),
+ {
+ enabled: enabled && typeof projectRef !== 'undefined',
+ ...options,
+ }
+ )
diff --git a/apps/studio/data/third-party-auth/keys.ts b/apps/studio/data/third-party-auth/keys.ts
new file mode 100644
index 00000000000..39594a30c9f
--- /dev/null
+++ b/apps/studio/data/third-party-auth/keys.ts
@@ -0,0 +1,4 @@
+export const keys = {
+ integrations: (projectRef: string | undefined) =>
+ ['auth', projectRef, 'third-party-auth'] as const,
+}
diff --git a/apps/studio/hooks/ui/useFlag.ts b/apps/studio/hooks/ui/useFlag.ts
index eb7345537f7..f7f8633f5bc 100644
--- a/apps/studio/hooks/ui/useFlag.ts
+++ b/apps/studio/hooks/ui/useFlag.ts
@@ -4,7 +4,7 @@ import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-que
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useContext } from 'react'
-export function useFlag<T = any>(name: string) {
+export function useFlag<T = boolean>(name: string) {
const store: any = useContext(FlagContext)
const isObjectEmpty = (objectName: Object) => {
@@ -19,7 +19,7 @@ export function useFlag<T = any>(name: string) {
}
export const useIsOptedIntoProjectLevelPermissions = (slug: string) => {
- const orgsOptedIn = useFlag('projectLevelPermissionsOptIn')
+ const orgsOptedIn = useFlag('projectLevelPermissionsOptIn') as string | undefined
const canReadSubscriptions = useCheckPermissions(
PermissionAction.BILLING_READ,
'stripe.subscriptions'
diff --git a/apps/studio/pages/project/[ref]/settings/auth.tsx b/apps/studio/pages/project/[ref]/settings/auth.tsx
index 41df7ba172f..4426c483d7a 100644
--- a/apps/studio/pages/project/[ref]/settings/auth.tsx
+++ b/apps/studio/pages/project/[ref]/settings/auth.tsx
@@ -4,6 +4,7 @@ import {
AdvancedAuthSettingsForm,
BasicAuthSettingsForm,
SmtpForm,
+ ThirdPartyAuthForm,
} from 'components/interfaces/Auth'
import SettingsLayout from 'components/layouts/ProjectSettingsLayout/SettingsLayout'
import {
@@ -19,6 +20,7 @@ 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 (
@@ -39,6 +41,7 @@ const AuthSettings: NextPageWithLayout = () => {
<BasicAuthSettingsForm />
<SmtpForm />
<AdvancedAuthSettingsForm />
+ <ThirdPartyAuthForm />
</>
)}
</ScaffoldContainer>
diff --git a/apps/studio/public/img/icons/firebase-icon.svg b/apps/studio/public/img/icons/firebase-icon.svg
index 400716b89d4..f7515edcb5f 100644
--- a/apps/studio/public/img/icons/firebase-icon.svg
+++ b/apps/studio/public/img/icons/firebase-icon.svg
@@ -1,51 +1,6 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="111px" height="151px" viewBox="0 0 111 151" version="1.1">
- <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
- <title>logo_lockup_firebase_vertical</title>
- <desc>Created with Sketch.</desc>
- <defs>
- <linearGradient x1="-3.48177083%" y1="17.0266727%" x2="100.833333%" y2="92.8868033%" id="linearGradient-1">
- <stop stop-color="#FFFFFF" stop-opacity="0.1" offset="0%"/>
- <stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"/>
- </linearGradient>
- <path d="M95.7984919,33.6246194 C95.5859256,32.3610745 94.6848395,31.3206592 93.4615125,30.9262876 C92.2381855,30.5319161 90.8962602,30.8492378 89.9812105,31.7492661 L72.2727216,49.5651223 L58.2428077,23.0544463 C57.6801918,21.9189555 56.5194912,21.2001264 55.2486188,21.2001264 C53.9777463,21.2001264 52.8170458,21.9189555 52.2544298,23.0544463 L44.6406351,37.5458126 L25.3922776,1.91410025 C23.852409,-0.984173003 19.489448,-0.216983024 18.9761585,3.02226355 L0.497735304,121.16952 L50.0301752,148.873603 C53.1471684,150.578603 56.9223279,150.578603 60.0393211,148.873603 L109.999502,121.16952 L95.7984919,33.6246194 Z" id="path-2"/>
- </defs>
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
- <g id="styleguide" transform="translate(-664.000000, -1272.000000)">
- <g id="Group-16" transform="translate(40.000000, 1187.000000)">
- <g id="Group-9" transform="translate(114.000000, 0.000000)">
- <g id="Group-26" transform="translate(405.000000, 1.000000)">
- <g id="logo_lockup_firebase_vertical" transform="translate(105.193370, 83.977901)">
- <g id="_Group_">
- <mask id="mask-3" fill="white">
- <use xlink:href="#path-2"/>
- </mask>
- <use id="_Path_5" fill="url(#linearGradient-1)" fill-rule="nonzero" xlink:href="#path-2"/>
- <g id="_Group_2" mask="url(#mask-3)">
- <g transform="translate(-6.346125, -0.160154)">
- <g id="_Group_3" stroke-width="1" fill="none" fill-rule="evenodd">
- <path d="M6.84386044,121.329674 L25.4078319,3.18241769 C25.9211214,-0.0568288873 30.2840824,-0.824018866 31.823951,2.07425439 L50.9867602,37.7059667 L58.600555,23.2146005 C59.189165,22.0849984 60.360174,21.3760986 61.637518,21.3760986 C62.9148621,21.3760986 64.0858711,22.0849984 64.6744811,23.2146005 L116.345627,121.329674 L6.84386044,121.329674 Z" id="_Path_" fill="#FFA000" fill-rule="nonzero"/>
- <g id="_Group_4" transform="translate(0.000000, 30.119310)">
- <image id="Bitmap" opacity="0.12" x="0" y="0" width="74.4269822" height="94.6200974" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAABwCAYAAABrYeziAAAABGdBTUEAA1teXP8meAAAAAlwSFlzAAADsQAAA7EB9YPtSQAAEqpJREFUeAHtnctyG8mVhjOzCjfeQYkUKXHaVLeldsvhxYQfYPwA3uoV5jVkvoZfobeO8Faz8sLhhcPhnnaPQ6bdpCiKoiiSAkEAVZnznQQKBCkAJIAqAqBVUrEuWVXI/OvHnydP5klo55z6vGSDgMnmsZ+fKgiEdxkGzdL5vdQUlm9q56lMi38nwU1ABUX97XOlvztQ+tkKuH6rnNJa3RbI+hZfZKYsaT8cZLcA9b9+pcxfdlSwdr5hjqzVZWPcm+KO/cWGiv/npbIvILHQuH1fBjt3C9wWsOu/VEF5fyNU+Uo+Cku5KI5NGAQ2jKoNVZ+tHz3Yifb+pOKsAb5TFVrCWLX3MKcWT0rnJbUY6/q9sNBYka0cy3lJF2bL9RkQtv3Iu6O5sPYZ+rr9x81wLjwqQNYFrYNlvvtLzoY5p+KGtsGH2DkzF1bc9vamffZ8u4EG66zk4c4wV1j45Stllgsfcy4fzEY6XIZC61qZnygXf+m3HMt5SZfr5Pos2Xs3mNti7as/oLPFqBjqxnzk7H0AfeS0e6SdLmGUVbHLYLBthFpXa3FYe7W/ET17vmOzYu+dYG7C2nrxLKdsrWSDYEk5vYopALDuP9h+0do+kvM+nevk+izZO/3gJqzFOsirfCEyel7Hdhk2PmjKgl5HVZEHvS7Hcl7S5Tq5HvaGotWeve2qKJ2dqQe3k7WN3PmMDsNFF+j7xqlVZGAVmO476+7LVo7lvKTLdXJ9luydbnCvsFY3zFwMK7EIVmkfCLD3aCYswcoFv/XHblXS5Tq5Pkv2TjW43VirhZVKrSjDVuslJGEOW2vGbzn250n312XM3ukFtwdrqbhWZIW5y6zzVGZFHAoFv5VjzifXZM3eqQW3F2vtBWsXkYUZ1jxuhFxzq2CwXhT2ynVZs3c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xcwXXz2ztwOW63Uvgdl7sgf4MZickA+//P/vhCEa0nVHjAAAAAElFTkSuQmCC"/>
- <polygon id="Shape" fill="#F57C00" fill-rule="nonzero" points="70.8339555 45.1789654 50.901212 7.58665646 6.84386044 91.2103641"/>
- </g>
- </g>
- <g id="_Group_5" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(3.421930, 23.299844)">
- <image id="_Image_" opacity="0.2" x="0" y="0" width="119.767558" height="131.27473" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACbCAYAAACwE3MdAAAABGdBTUEAA1teXP8meAAAAAlwSFlzAAADsQAAA7EB9YPtSQAAFbBJREFUeAHtndly28jVx3sBQFIUJVm7l5loJlOTlH2V8gOMHyC3foXvNcZ+je8V/BLOdcqVq5mqpKamnMpkLInaKYkLgO78T5OgKIukSaDBtWGDDWLpbvT56SwNdJNrrZlbXAuM2gJi1BPdea4FqAU81wzz1wIcyzC7wHFLsBzDTkl90zynfFNXyF04uAUSUN4yxp9j3XnF+L9qjPgwy/cVpqvvmf4ZvPyIlahJjtlKHTC2WjLvfEALgfLDKyaq1ReCXV5Ktt6UrWZs3IqKFPqyIFV8VYrL5Y+K/cRiAucNVlpsVc8BY6sl88wHsLxjTLAXTJbOn3gnwW0gZSEoysgPZezFqiCkaCqhvFDroFXmreZZczU8OPgY/e09UzahcT5MnoK2kTfB8pqJ1X9854XRRVArRCuBXyhr0SrHQqww7Rc4j4WK/VhwXWeseV2L9XWgzm/Yx4M6e/Ux0u9ZbKMqlIfTMLZaMo98OrDc/P3AL4vLAvPEauTpDR3KLSbUI3gp65rzFaG1UIyHXLKa1upMRrIaqui0yNjlodhq7P/ll+j1O6Zs+DROw+QhaBt59sCysXFRbNRERWmxpWK2LwV7DFj2GOebnPGy5kxwpltM83PBxCclmOdJP24KFW74tWinak/DOGBsCNd2Hp/BEoZ8jQdiG77rE6n015qLr5kQjwHJltK6jDCJIqUGPNszQFPE/hiB960fiptCvVmvxizEcYU1s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GxzE3jcHYnurJWi261YzFjeAheZjowVqRQcFqUpFX9WPhD4sFlVh/Re1jKC0W4RU72Jr0OQ+76W94JBzzF5jrhJMipFMXkxz0n7oXPE9Zo+sYiIThrn1kyGmMFnG9tzLdEm+LCUwvbJN4OndRxroRzDRu2+ZIbnXDsuoYXobwG2P1wL/Azyrjq9QHp0DAAAAAElFTkSuQmCC"/>
- <g id="_Group_6" transform="translate(3.421930, 7.387755)" fill-rule="nonzero" fill="#FFCA28">
- <path d="M109.501767,90.6420753 L95.3007566,3.09717436 C95.0881903,1.8336295 94.1871042,0.793214154 92.9637772,0.398842606 C91.7404502,0.00447105695 90.3985249,0.321792836 89.4834752,1.22182108 L0,90.6420753 L49.5324399,118.346158 C52.6494331,120.051158 56.4245926,120.051158 59.5415858,118.346158 L109.501767,90.6420753 Z" id="_Path_2"/>
- </g>
- </g>
- <path d="M102.144617,33.7847735 C101.932051,32.5212286 101.030965,31.4808133 99.8076376,31.0864418 C98.5843106,30.6920702 97.2423854,31.009392 96.3273356,31.9094202 L78.6188467,49.7252764 L64.5889329,23.2146005 C64.0263169,22.0791096 62.8656164,21.3602806 61.5947439,21.3602806 C60.3238715,21.3602806 59.1631709,22.0791096 58.600555,23.2146005 L50.9867602,37.7059667 L31.7384028,2.07425439 C30.1985342,-0.824018866 25.8355731,-0.0568288873 25.3222836,3.18241769 L6.84386044,121.329674 L6.75831218,121.329674 L6.84386044,121.414918 L7.35714997,121.670648 L78.5332985,50.5777097 L96.3273356,32.8470969 C97.2423854,31.9470686 98.5843106,31.6297468 99.8076376,32.0241184 C101.030965,32.4184899 101.932051,33.4589053 102.144617,34.7224501 L116.174531,121.414918 L116.345627,121.329674 L102.144617,33.7847735 Z M7.01495695,121.159188 L25.4078319,4.034851 C25.9211214,0.795604422 30.2840824,0.0284144437 31.823951,2.9266877 L50.9867602,38.5584 L58.600555,24.0670338 C59.189165,22.9374317 60.360174,22.2285319 61.637518,22.2285319 C62.9148621,22.2285319 64.0858711,22.9374317 64.6744811,24.0670338 L78.362202,49.9810064 L7.01495695,121.159188 Z" id="_Compound_Path_" fill-opacity="0.2" fill="#FFFFFF" fill-rule="nonzero"/>
- <path d="M66.3854462,148.181324 C63.2684531,149.886324 59.4932935,149.886324 56.3763003,148.181324 L6.92940869,120.562484 L6.84386044,121.329674 L56.3763003,149.033757 C59.4932935,150.738757 63.2684531,150.738757 66.3854462,149.033757 L116.345627,121.329674 L116.260079,120.562484 L66.3854462,148.181324 Z" id="_Path_3" fill="#A52714" fill-rule="nonzero" opacity="0.2"/>
- </g>
- </g>
- <polygon id="_Path_4" mask="url(#mask-3)" points="-26.8777064 -6.69547618 137.374944 -6.69547618 137.374944 156.971719 -26.8777064 156.971719"/>
- <path d="M95.7984919,33.6246194 C95.5859256,32.3610745 94.6848395,31.3206592 93.4615125,30.9262876 C92.2381855,30.5319161 90.8962602,30.8492378 89.9812105,31.7492661 L72.2727216,49.5651223 L58.2428077,23.0544463 C57.6801918,21.9189555 56.5194912,21.2001264 55.2486188,21.2001264 C53.9777463,21.2001264 52.8170458,21.9189555 52.2544298,23.0544463 L44.6406351,37.5458126 L25.3922776,1.91410025 C23.852409,-0.984173003 19.489448,-0.216983024 18.9761585,3.02226355 L0.497735304,121.16952 L50.0301752,148.873603 C53.1471684,150.578603 56.9223279,150.578603 60.0393211,148.873603 L109.999502,121.16952 L95.7984919,33.6246194 Z" id="_Path_5" fill="url(#linearGradient-1)" fill-rule="nonzero" mask="url(#mask-3)"/>
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
-</svg>
\ No newline at end of file
+<svg width="600" height="600" viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M213.918 560.499C237.166 569.856 262.387 575.408 288.87 576.333C324.71 577.585 358.792 570.175 389.261 556.099C352.724 541.744 319.634 520.751 291.392 494.651C273.086 523.961 246.01 547.113 213.918 560.499Z" fill="#FF9100"/>
+<path d="M291.389 494.66C226.923 435.038 187.815 348.743 191.12 254.092C191.228 251.019 191.39 247.947 191.58 244.876C180.034 241.89 167.98 240.068 155.576 239.635C137.821 239.015 120.626 241.217 104.393 245.788C87.1838 275.933 76.7989 310.521 75.5051 347.569C72.1663 443.18 130.027 526.723 213.914 560.508C246.007 547.121 273.082 523.998 291.389 494.66Z" fill="#FFC400"/>
+<path d="M291.39 494.657C306.378 470.671 315.465 442.551 316.523 412.254C319.306 332.559 265.731 264.003 191.581 244.873C191.391 247.944 191.229 251.016 191.121 254.089C187.816 348.74 226.924 435.035 291.39 494.657Z" fill="#FF9100"/>
+<path d="M308.231 20.8584C266 54.6908 232.652 99.302 212.475 150.693C200.924 180.129 193.665 211.748 191.546 244.893C265.696 264.023 319.272 332.579 316.489 412.273C315.431 442.57 306.317 470.663 291.355 494.677C319.595 520.804 352.686 541.77 389.223 556.124C462.56 522.224 514.593 449.278 517.606 362.997C519.558 307.096 498.08 257.273 467.731 215.219C435.68 170.742 308.231 20.8584 308.231 20.8584Z" fill="#DD2C00"/>
+</svg>