MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / SSOConfigPage

Function SSOConfigPage

packages/ui/src/views/auth/ssoConfig.jsx:39–1031  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37const PLACEHOLDER_SECRET = '********'
38
39const SSOConfigPage = () => {
40 useNotifier()
41 const { error, setError } = useError()
42 const theme = useTheme()
43
44 const dispatch = useDispatch()
45 const enqueueSnackbar = (...args) => dispatch(enqueueSnackbarAction(...args))
46 const closeSnackbar = (...args) => dispatch(closeSnackbarAction(...args))
47
48 const [azureConfigEnabled, setAzureConfigEnabled] = useState(false)
49 const [azureTenantID, setAzureTenantID] = useState('')
50 const [azureClientID, setAzureClientID] = useState('')
51 const [azureClientSecret, setAzureClientSecret] = useState('')
52 const [azureCallbackURL, setAzureCallbackURL] = useState('')
53
54 const [googleConfigEnabled, setGoogleConfigEnabled] = useState(false)
55 const [googleClientID, setGoogleClientID] = useState('')
56 const [googleClientSecret, setGoogleClientSecret] = useState('')
57 const [googleCallbackURL, setGoogleCallbackURL] = useState('')
58
59 const [githubConfigEnabled, setGithubConfigEnabled] = useState(false)
60 const [githubClientID, setGithubClientID] = useState('')
61 const [githubClientSecret, setGithubClientSecret] = useState('')
62 const [githubCallbackURL, setGithubCallbackURL] = useState('')
63
64 const [auth0ConfigEnabled, setAuth0ConfigEnabled] = useState(false)
65 const [auth0Domain, setAuth0Domain] = useState('')
66 const [auth0ClientID, setAuth0ClientID] = useState('')
67 const [auth0ClientSecret, setAuth0ClientSecret] = useState('')
68 const [auth0CallbackURL, setAuth0CallbackURL] = useState('')
69
70 const [loading, setLoading] = useState(false)
71 const [authErrors, setAuthErrors] = useState([])
72
73 const getLoginMethodsApi = useApi(loginMethodApi.getLoginMethods)
74 const [tabValue, setTabValue] = useState(0)
75
76 const [copyAnchorEl, setCopyAnchorEl] = useState(null)
77 const openCopyPopOver = Boolean(copyAnchorEl)
78
79 const currentUser = useSelector((state) => state.auth.user)
80
81 const handleCloseCopyPopOver = () => {
82 setCopyAnchorEl(null)
83 }
84
85 const validateAzureFields = (validationErrors) => {
86 if (!azureTenantID) {
87 validationErrors.push('Azure TenantID cannot be left blank!')
88 }
89 if (!azureClientID) {
90 validationErrors.push('Azure ClientID cannot be left blank!')
91 }
92 if (!azureClientSecret) {
93 validationErrors.push('Azure Client Secret cannot be left blank!')
94 }
95 }
96 const validateGoogleFields = (validationErrors) => {

Callers

nothing calls this directly

Calls 6

useErrorFunction · 0.90
useNotifierFunction · 0.85
validateAndTestFunction · 0.85
getSelectedProviderNameFunction · 0.85
handleCloseCopyPopOverFunction · 0.70
validateAndSubmitFunction · 0.70

Tested by

no test coverage detected