fix(ui): remove okta backward-compat detection that hides generic_* SSO config

Users who configured Okta via generic OIDC env vars (GENERIC_*) previously had
their config detected as 'okta' but rendered against okta_* fields, leaving the
SSO settings page empty. Treat presence of generic_client_id as the 'generic'
provider so the existing generic_* values render correctly.

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-15 12:32:26 +00:00
parent fa6154e2dd
commit 646a8cae19
No known key found for this signature in database

View file

@ -94,12 +94,6 @@ export const detectSSOProvider = (values: SSOSettingsValues): string | null => {
if (values.google_client_id) return "google";
if (values.microsoft_client_id) return "microsoft";
if (values.okta_client_id) return "okta";
if (values.generic_client_id) {
// Backward compatibility: older Okta UI settings were stored as generic OIDC endpoints.
if (values.generic_authorization_endpoint?.includes("okta")) {
return "okta";
}
return "generic";
}
if (values.generic_client_id) return "generic";
return null;
};