@@ -26,8 +26,6 @@ import {
2626 UpdateMeProfileConfig as BaseUpdateMeProfileConfig ,
2727} from '@asgardeo/browser' ;
2828
29- const httpClient : HttpInstance = AsgardeoSPAClient . getInstance ( ) . httpRequest . bind ( AsgardeoSPAClient . getInstance ( ) ) ;
30-
3129/**
3230 * Configuration for the updateMeProfile request (React-specific)
3331 */
@@ -37,6 +35,10 @@ export interface UpdateMeProfileConfig extends Omit<BaseUpdateMeProfileConfig, '
3735 * which is a wrapper around axios http.request
3836 */
3937 fetcher ?: ( url : string , config : RequestInit ) => Promise < Response > ;
38+ /**
39+ * Optional instance ID for multi-instance support. Defaults to 0.
40+ */
41+ instanceId ?: number ;
4042}
4143
4244/**
@@ -64,8 +66,11 @@ export interface UpdateMeProfileConfig extends Omit<BaseUpdateMeProfileConfig, '
6466 * });
6567 * ```
6668 */
67- const updateMeProfile = async ( { fetcher, ...requestConfig } : UpdateMeProfileConfig ) : Promise < User > => {
69+ const updateMeProfile = async ( { fetcher, instanceId = 0 , ...requestConfig } : UpdateMeProfileConfig ) : Promise < User > => {
6870 const defaultFetcher = async ( url : string , config : RequestInit ) : Promise < Response > => {
71+ const httpClient : HttpInstance = AsgardeoSPAClient . getInstance ( instanceId ) . httpRequest . bind (
72+ AsgardeoSPAClient . getInstance ( instanceId )
73+ ) ;
6974 const response : HttpResponse < any > = await httpClient ( {
7075 data : config . body ? JSON . parse ( config . body as string ) : undefined ,
7176 headers : config . headers as Record < string , string > ,
0 commit comments