- {sortedAuthClients.map((client) => (
+ {sortedOAuthClients.map((client) => (
@@ -70,8 +71,13 @@ function AdminApplicationAuthClients(props) {
))}
-
@@ -79,8 +85,8 @@ function AdminApplicationAuthClients(props) {
);
}
-AdminApplicationAuthClients.propTypes = {
+AdminApplicationOAuthClients.propTypes = {
appKey: PropTypes.string.isRequired,
};
-export default AdminApplicationAuthClients;
+export default AdminApplicationOAuthClients;
diff --git a/packages/web/src/components/AdminApplicationSettings/index.jsx b/packages/web/src/components/AdminApplicationSettings/index.jsx
index 34ef8d0c..99b46a74 100644
--- a/packages/web/src/components/AdminApplicationSettings/index.jsx
+++ b/packages/web/src/components/AdminApplicationSettings/index.jsx
@@ -46,9 +46,8 @@ function AdminApplicationSettings(props) {
const defaultValues = useMemo(
() => ({
- customConnectionAllowed:
- appConfig?.data?.customConnectionAllowed || false,
- shared: appConfig?.data?.shared || false,
+ useOnlyPredefinedAuthClients:
+ appConfig?.data?.useOnlyPredefinedAuthClients || false,
disabled: appConfig?.data?.disabled || false,
}),
[appConfig?.data],
@@ -62,21 +61,17 @@ function AdminApplicationSettings(props) {
-
-
+
+
+
({
...field,
@@ -31,13 +31,13 @@ function AdminApplicationUpdateAuthClient(props) {
}));
const submitHandler = async (values) => {
- if (!adminAppAuthClient) {
+ if (!adminOAuthClient) {
return;
}
const { name, active, ...formattedAuthDefaults } = values;
- await updateAppAuthClient({
+ await updateOAuthClient({
name,
active,
formattedAuthDefaults,
@@ -64,31 +64,31 @@ function AdminApplicationUpdateAuthClient(props) {
const defaultValues = useMemo(
() => ({
- name: adminAppAuthClient?.data?.name || '',
- active: adminAppAuthClient?.data?.active || false,
+ name: adminOAuthClient?.data?.name || '',
+ active: adminOAuthClient?.data?.active || false,
...getAuthFieldsDefaultValues(),
}),
- [adminAppAuthClient, getAuthFieldsDefaultValues],
+ [adminOAuthClient, getAuthFieldsDefaultValues],
);
return (
-
);
}
-AdminApplicationUpdateAuthClient.propTypes = {
+AdminApplicationUpdateOAuthClient.propTypes = {
application: AppPropType.isRequired,
onClose: PropTypes.func.isRequired,
};
-export default AdminApplicationUpdateAuthClient;
+export default AdminApplicationUpdateOAuthClient;
diff --git a/packages/web/src/components/AppAuthClientsDialog/index.ee.jsx b/packages/web/src/components/AppAuthClientsDialog/index.ee.jsx
deleted file mode 100644
index a9cce58d..00000000
--- a/packages/web/src/components/AppAuthClientsDialog/index.ee.jsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import PropTypes from 'prop-types';
-import Dialog from '@mui/material/Dialog';
-import DialogTitle from '@mui/material/DialogTitle';
-import List from '@mui/material/List';
-import ListItem from '@mui/material/ListItem';
-import ListItemButton from '@mui/material/ListItemButton';
-import ListItemText from '@mui/material/ListItemText';
-import * as React from 'react';
-import useAppAuthClients from 'hooks/useAppAuthClients';
-import useFormatMessage from 'hooks/useFormatMessage';
-
-function AppAuthClientsDialog(props) {
- const { appKey, onClientClick, onClose } = props;
- const { data: appAuthClients } = useAppAuthClients(appKey);
-
- const formatMessage = useFormatMessage();
-
- React.useEffect(
- function autoAuthenticateSingleClient() {
- if (appAuthClients?.data.length === 1) {
- onClientClick(appAuthClients.data[0].id);
- }
- },
- [appAuthClients?.data],
- );
-
- if (!appAuthClients?.data.length || appAuthClients?.data.length === 1)
- return ;
-
- return (
-
- );
-}
-
-AppAuthClientsDialog.propTypes = {
- appKey: PropTypes.string.isRequired,
- onClientClick: PropTypes.func.isRequired,
- onClose: PropTypes.func.isRequired,
-};
-
-export default AppAuthClientsDialog;
diff --git a/packages/web/src/components/AppConnectionContextMenu/index.jsx b/packages/web/src/components/AppConnectionContextMenu/index.jsx
index fb94e4b3..8e7eb318 100644
--- a/packages/web/src/components/AppConnectionContextMenu/index.jsx
+++ b/packages/web/src/components/AppConnectionContextMenu/index.jsx
@@ -11,14 +11,7 @@ import { useQueryClient } from '@tanstack/react-query';
import Can from 'components/Can';
function ContextMenu(props) {
- const {
- appKey,
- connection,
- onClose,
- onMenuItemClick,
- anchorEl,
- disableReconnection,
- } = props;
+ const { appKey, connection, onClose, onMenuItemClick, anchorEl } = props;
const formatMessage = useFormatMessage();
const queryClient = useQueryClient();
@@ -73,11 +66,11 @@ function ContextMenu(props) {
{(allowed) => (
}
+ path={`/oauth-clients/*`}
+ element={