mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
> [!CAUTION] > This new SSO field is UI-only until `oidc_issuer` is added to the `config` object. ## What kind of change does this PR introduce? Feature ## What is the current behavior? The SAML SSO provider config form has no way to supply an OIDC Issuer URL, which is required for enterprise-managed MCP authentication. ## What is the new behavior? - Adds an **OIDC Issuer URL** field to the SAML SSO provider config form (`/org/_/sso`) inside an "Advanced settings" collapsible. - Minor UI touch-ups to that SSO form. | After | | --- | | <img width="1434" height="2458" alt="94962" src="https://github.com/user-attachments/assets/e56f83cd-6e30-4a3f-a78d-330fc053953a" /> | The `oidcIssuer` field is UI-only right now; it renders but does not write. Before merging: 1. Add `oidc_issuer` to the SSO config API type (removes the `as any` cast in `SSOConfig.tsx:219`) 2. Add `oidc_issuer: values.oidcIssuer || undefined` to the `onSubmit` payload at `SSOConfig.tsx:183` 3. Wire the backend endpoint to persist and return the field <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * SSO settings now include an "Advanced settings" collapsible with an OIDC issuer field. * **UX / Bug Fixes** * Small UI/description refinements in SSO forms and attribute-mapping layouts. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46187?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Cemal Kilic <cemalkilic96@gmail.com> Co-authored-by: Cemal Kılıç <cemalkilic@users.noreply.github.com>
74 lines
2.3 KiB
TypeScript
74 lines
2.3 KiB
TypeScript
import { useForm } from 'react-hook-form'
|
|
import {
|
|
FormControl,
|
|
FormField,
|
|
Select,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectItem,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
Switch,
|
|
} from 'ui'
|
|
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
|
|
|
|
import { SSOConfigFormSchema } from './SSOConfig'
|
|
|
|
export const JoinOrganizationOnSignup = ({
|
|
form,
|
|
}: {
|
|
form: ReturnType<typeof useForm<SSOConfigFormSchema>>
|
|
}) => {
|
|
const joinOrgOnSignup = form.watch('joinOrgOnSignup')
|
|
|
|
return (
|
|
<div className="space-y-4">
|
|
<FormField
|
|
control={form.control}
|
|
name="joinOrgOnSignup"
|
|
render={({ field }) => (
|
|
<FormItemLayout
|
|
layout="flex-row-reverse"
|
|
label="Automatically add users to organization on sign up"
|
|
description="If disabled, users will need to be invited to the organization after signing up."
|
|
>
|
|
<FormControl className="flex items-center gap-2">
|
|
<Switch checked={field.value} onCheckedChange={field.onChange} />
|
|
</FormControl>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
{joinOrgOnSignup && (
|
|
<FormField
|
|
control={form.control}
|
|
name="roleOnJoin"
|
|
render={({ field }) => (
|
|
<FormItemLayout
|
|
label="Default role on join"
|
|
description="Select a role for the user when they join the organization"
|
|
layout="flex-row-reverse"
|
|
className="justify-between"
|
|
>
|
|
<FormControl>
|
|
<Select value={field.value} onValueChange={(val) => field.onChange(val)}>
|
|
<SelectTrigger className="w-52">
|
|
<SelectValue placeholder="Select a role" />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectGroup>
|
|
<SelectItem value="Owner">Owner</SelectItem>
|
|
<SelectItem value="Administrator">Administrator</SelectItem>
|
|
<SelectItem value="Developer">Developer</SelectItem>
|
|
<SelectItem value="Read-only">Read-only</SelectItem>
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</Select>
|
|
</FormControl>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|