-
-
-
- {t('admin.settings.connections.oauth2', 'OAuth2')}
-
-
- {settings.oauth2?.enabled ? t('admin.status.active', 'Active') : t('admin.status.inactive', 'Inactive')}
-
-
-
-
-
- {t('admin.settings.connections.oauth2.enabled', 'Enable OAuth2')}
-
- {t('admin.settings.connections.oauth2.enabled.description', 'Allow users to authenticate using OAuth2 providers')}
-
-
-
setSettings({ ...settings, oauth2: { ...settings.oauth2, enabled: e.target.checked } })}
- />
-
-
+ {/* Linked Services Section - Only show if there are linked providers */}
+ {linkedProviders.length > 0 && (
+ <>
-
setSettings({ ...settings, oauth2: { ...settings.oauth2, provider: value || '' } })}
- data={[
- { value: 'google', label: 'Google' },
- { value: 'github', label: 'GitHub' },
- { value: 'keycloak', label: 'Keycloak' },
- ]}
- leftSection={getProviderIcon(settings.oauth2?.provider)}
- comboboxProps={{ zIndex: 1400 }}
- />
+
+ {t('admin.settings.connections.linkedServices', 'Linked Services')}
+
+
+ {linkedProviders.map((provider) => (
+ handleProviderSave(provider, providerSettings)}
+ onDisconnect={() => handleProviderDisconnect(provider)}
+ />
+ ))}
+
-
- setSettings({ ...settings, oauth2: { ...settings.oauth2, issuer: e.target.value } })}
- placeholder="https://accounts.google.com"
- />
-
+ {/* Divider between sections */}
+ {availableProviders.length > 0 && }
+ >
+ )}
-
- setSettings({ ...settings, oauth2: { ...settings.oauth2, clientId: e.target.value } })}
- />
-
-
-
-
setSettings({ ...settings, oauth2: { ...settings.oauth2, clientSecret: e.target.value } })}
- />
-
-
-
-
- {t('admin.settings.connections.oauth2.autoCreateUser', 'Auto Create Users')}
-
- {t('admin.settings.connections.oauth2.autoCreateUser.description', 'Automatically create user accounts on first OAuth2 login')}
-
-
-
setSettings({ ...settings, oauth2: { ...settings.oauth2, autoCreateUser: e.target.checked } })}
- />
-
-
-
-
- {t('admin.settings.connections.oauth2.blockRegistration', 'Block Registration')}
-
- {t('admin.settings.connections.oauth2.blockRegistration.description', 'Prevent new user registration via OAuth2')}
-
-
-
setSettings({ ...settings, oauth2: { ...settings.oauth2, blockRegistration: e.target.checked } })}
- />
-
-
-
- setSettings({ ...settings, oauth2: { ...settings.oauth2, useAsUsername: e.target.value } })}
- placeholder="email"
- />
-
-
-
- setSettings({ ...settings, oauth2: { ...settings.oauth2, scopes: e.target.value } })}
- placeholder="openid, profile, email"
- />
-
-
-