refactor: simplify forward authentication handling in UI and API

- Removed the selection of SSO providers from the UI, streamlining the process to enable/disable SSO for domains.
- Updated the API to eliminate the need for a provider ID when enabling forward authentication, relying on the configured settings instead.
- Enhanced user feedback by updating toast messages to reflect the current state of SSO authentication.
- Improved the UI layout for better clarity on SSO status and actions.

This refactor enhances the user experience by simplifying the SSO configuration process and ensuring clearer communication of actions taken.
This commit is contained in:
Mauricio Siu
2026-06-06 03:37:31 -06:00
parent 41c09cd86b
commit 4f6e57cc9c
3 changed files with 42 additions and 116 deletions

View File

@@ -124,12 +124,7 @@ export const forwardAuthRouter = createTRPCRouter({
.query(({ ctx, input }) => getDomainSsoStatus(ctx, input.domainId)),
enable: enterpriseProcedure
.input(
z.object({
domainId: z.string().min(1),
providerId: z.string().min(1),
}),
)
.input(z.object({ domainId: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {
const domain = await assertApplicationDomainAccess(
ctx,
@@ -138,8 +133,6 @@ export const forwardAuthRouter = createTRPCRouter({
);
const result = await enableForwardAuthOnDomain({
domainId: input.domainId,
providerId: input.providerId,
organizationId: ctx.session.activeOrganizationId,
});
await audit(ctx, {
action: "update",