MCPcopy Index your code
hub / github.com/simstudioai/sim / useConfigureSSO

Function useConfigureSSO

apps/sim/ee/sso/hooks/sso.ts:55–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53type ConfigureSSOParams = Record<string, unknown>
54
55export function useConfigureSSO() {
56 const queryClient = useQueryClient()
57
58 return useMutation({
59 mutationFn: (config: ConfigureSSOParams) =>
60 requestJson(ssoRegistrationContract, {
61 body: config as SsoRegistrationBody,
62 }),
63 onSettled: (_data, _error, variables) => {
64 queryClient.invalidateQueries({ queryKey: ssoKeys.providers() })
65
66 const orgId = typeof variables.orgId === 'string' ? variables.orgId : undefined
67 if (orgId) {
68 queryClient.invalidateQueries({ queryKey: organizationKeys.detail(orgId) })
69 queryClient.invalidateQueries({ queryKey: organizationKeys.lists() })
70 }
71 },
72 })
73}

Callers 1

SSOFunction · 0.90

Calls 1

requestJsonFunction · 0.90

Tested by

no test coverage detected