Skip to content

Commit 6e3e3d7

Browse files
committed
fix: update AsgardeoProvider and AsgardeoContext for improved functionality
1 parent 15069ee commit 6e3e3d7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/react/src/contexts/Asgardeo/AsgardeoContext.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export type AsgardeoContextProps = {
139139
*/
140140
reInitialize: (config: Partial<AsgardeoReactConfig>) => Promise<boolean>;
141141
} & Pick<AsgardeoReactConfig, 'storage' | 'platform'> &
142-
Pick<AsgardeoReactClient, 'clearSession'>;
142+
Pick<AsgardeoReactClient, 'clearSession' | 'switchOrganization'>;
143143

144144
/**
145145
* Context object for managing the Authentication flow builder core context.
@@ -170,6 +170,7 @@ const AsgardeoContext: Context<AsgardeoContextProps | null> = createContext<null
170170
getAccessToken: null,
171171
exchangeToken: null,
172172
storage: 'sessionStorage',
173+
switchOrganization: null,
173174
reInitialize: null,
174175
platform: undefined,
175176
});

packages/react/src/contexts/Asgardeo/AsgardeoProvider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ const AsgardeoProvider: FC<PropsWithChildren<AsgardeoProviderProps>> = ({
519519
exchangeToken: asgardeo.exchangeToken.bind(asgardeo),
520520
syncSession,
521521
platform: config?.platform,
522+
switchOrganization
522523
}),
523524
[
524525
applicationId,
@@ -537,6 +538,7 @@ const AsgardeoProvider: FC<PropsWithChildren<AsgardeoProviderProps>> = ({
537538
asgardeo,
538539
signInOptions,
539540
syncSession,
541+
switchOrganization
540542
],
541543
);
542544

0 commit comments

Comments
 (0)