@@ -106,7 +106,7 @@ export type IdPFormData = {
106106} ;
107107
108108export function IdPManager ( ) {
109- const { isAuthenticated, apiClients } = useAuth ( ) ;
109+ const { isAuthenticated, clientApis } = useAuth ( ) ;
110110 const [ idps , setIdps ] = useState < IdP [ ] > ( [ ] ) ;
111111 const [ loading , setLoading ] = useState ( true ) ;
112112 const [ showAddForm , setShowAddForm ] = useState ( false ) ;
@@ -151,12 +151,12 @@ export function IdPManager() {
151151 }
152152
153153 // Try to fetch real data from backend
154- const countResponse = await apiClients . identityProviders . getAdminIdpsCount ( ) ;
154+ const countResponse = await clientApis . identityProviders . getAdminIdpsCount ( ) ;
155155
156156 // If we get real data from the backend, fetch the full list
157157 if ( countResponse . total && countResponse . total > 0 ) {
158158 // Fetch the actual identity providers list
159- const providersResponse = await apiClients . identityProviders . getAdminIdps ( ) ;
159+ const providersResponse = await clientApis . identityProviders . getAdminIdps ( ) ;
160160
161161 // Transform backend data to match our interface
162162 const transformedIdps = providersResponse . map ( ( provider ) => {
@@ -189,11 +189,11 @@ export function IdPManager() {
189189 } ;
190190
191191 loadIdPs ( ) ;
192- } , [ isAuthenticated , apiClients . identityProviders ] ) ;
192+ } , [ isAuthenticated , clientApis . identityProviders ] ) ;
193193
194194 const handleAddIdp = async ( formData : IdPFormData ) => {
195195 try {
196- if ( isAuthenticated && apiClients . identityProviders ) {
196+ if ( isAuthenticated && clientApis . identityProviders ) {
197197 // Try to add via backend API
198198 const config : Record < string , unknown > = {
199199 displayName : formData . displayName || formData . name ,
@@ -224,7 +224,7 @@ export function IdPManager() {
224224 if ( formData . metadataUrl ) config . metadataDescriptorUrl = formData . metadataUrl ;
225225 config . enabled = formData . enabled ;
226226
227- const response = await apiClients . identityProviders . postAdminIdps ( {
227+ const response = await clientApis . identityProviders . postAdminIdps ( {
228228 postAdminIdpsRequest : {
229229 alias : formData . name . toLowerCase ( ) . replace ( / \s + / g, '-' ) ,
230230 providerId : formData . type . toLowerCase ( ) ,
@@ -235,7 +235,7 @@ export function IdPManager() {
235235 console . log ( 'IdP added successfully:' , response ) ;
236236
237237 // Reload IdPs from backend
238- const providersResponse = await apiClients . identityProviders . getAdminIdps ( ) ;
238+ const providersResponse = await clientApis . identityProviders . getAdminIdps ( ) ;
239239 const transformedIdps = providersResponse . map ( ( provider ) => {
240240 const config = provider . config as Record < string , unknown > | undefined ;
241241 return {
@@ -298,9 +298,9 @@ export function IdPManager() {
298298
299299 const handleUpdateIdp = async ( updatedIdp : IdP ) => {
300300 try {
301- if ( isAuthenticated && apiClients . identityProviders ) {
301+ if ( isAuthenticated && clientApis . identityProviders ) {
302302 // Try to update via backend API
303- await apiClients . identityProviders . putAdminIdpsByAlias ( {
303+ await clientApis . identityProviders . putAdminIdpsByAlias ( {
304304 alias : updatedIdp . id ,
305305 putAdminIdpsByAliasRequest : {
306306 displayName : updatedIdp . name ,
@@ -313,7 +313,7 @@ export function IdPManager() {
313313 } ) ;
314314
315315 // Reload IdPs from backend
316- const providersResponse = await apiClients . identityProviders . getAdminIdps ( ) ;
316+ const providersResponse = await clientApis . identityProviders . getAdminIdps ( ) ;
317317 const transformedIdps = providersResponse . map ( ( provider ) => {
318318 const config = provider . config as Record < string , unknown > | undefined ;
319319 return {
@@ -384,12 +384,12 @@ export function IdPManager() {
384384
385385 const handleDeleteIdp = async ( id : string ) => {
386386 try {
387- if ( isAuthenticated && apiClients . identityProviders ) {
387+ if ( isAuthenticated && clientApis . identityProviders ) {
388388 // Try to delete via backend API
389- await apiClients . identityProviders . deleteAdminIdpsByAlias ( { alias : id } ) ;
389+ await clientApis . identityProviders . deleteAdminIdpsByAlias ( { alias : id } ) ;
390390
391391 // Reload IdPs from backend
392- const providersResponse = await apiClients . identityProviders . getAdminIdps ( ) ;
392+ const providersResponse = await clientApis . identityProviders . getAdminIdps ( ) ;
393393 const transformedIdps = providersResponse . map ( ( provider ) => {
394394 const config = provider . config as Record < string , unknown > | undefined ;
395395 return {
0 commit comments