@asgardeo/react 0.13.4 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { FC, PropsWithChildren } from 'react';
19
+ import { AsgardeoProviderProps } from '../../../contexts/Asgardeo/AsgardeoProvider';
20
+ export interface OrganizationContextProps extends Omit<AsgardeoProviderProps, 'organizationChain' | 'baseUrl'> {
21
+ /**
22
+ * Optional base URL for the organization context. If not provided, it will default to the source provider's base URL.
23
+ */
24
+ baseUrl?: string;
25
+ /**
26
+ * Instance ID for this organization context. Must be unique across the app if multiple contexts are used.
27
+ */
28
+ instanceId: number;
29
+ /**
30
+ * Optional source instance ID. If not provided, immediate parent provider is used as source.
31
+ */
32
+ sourceInstanceId?: number;
33
+ /**
34
+ * ID of the organization to authenticate with
35
+ */
36
+ targetOrganizationId: string;
37
+ }
38
+ declare const OrganizationContext: FC<PropsWithChildren<OrganizationContextProps>>;
39
+ export default OrganizationContext;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { FC } from 'react';
19
+ interface OrganizationContextControllerProps {
20
+ /**
21
+ * Children to render
22
+ */
23
+ children: React.ReactNode;
24
+ /**
25
+ * Whether the source provider is signed in
26
+ */
27
+ isSourceSignedIn: boolean;
28
+ /**
29
+ * ID of the organization to authenticate with
30
+ */
31
+ targetOrganizationId: string;
32
+ }
33
+ declare const OrganizationContextController: FC<OrganizationContextControllerProps>;
34
+ export default OrganizationContextController;
@@ -26,6 +26,7 @@ export type AsgardeoContextProps = {
26
26
  afterSignInUrl: string | undefined;
27
27
  applicationId: string | undefined;
28
28
  baseUrl: string | undefined;
29
+ clientId: string | undefined;
29
30
  /**
30
31
  * Swaps the current access token with a new one based on the provided configuration (with a grant type).
31
32
  * @param config - Configuration for the token exchange request.
package/dist/index.d.ts CHANGED
@@ -25,8 +25,6 @@ export * from './contexts/User/UserContext';
25
25
  export { default as UserProvider } from './contexts/User/UserProvider';
26
26
  export * from './contexts/User/UserProvider';
27
27
  export { default as useUser } from './contexts/User/useUser';
28
- export { default as OrganizationContext } from './contexts/Organization/OrganizationContext';
29
- export * from './contexts/Organization/OrganizationContext';
30
28
  export { default as OrganizationProvider } from './contexts/Organization/OrganizationProvider';
31
29
  export * from './contexts/Organization/OrganizationProvider';
32
30
  export { default as useOrganization } from './contexts/Organization/useOrganization';
@@ -74,6 +72,8 @@ export { default as SignedOut } from './components/control/SignedOut';
74
72
  export * from './components/control/SignedOut';
75
73
  export { default as Loading } from './components/control/Loading';
76
74
  export * from './components/control/Loading';
75
+ export { default as OrganizationContext } from './components/control/OrganizationContext/OrganizationContext';
76
+ export * from './components/control/OrganizationContext/OrganizationContext';
77
77
  export { default as BaseSignIn } from './components/presentation/auth/SignIn/BaseSignIn';
78
78
  export * from './components/presentation/auth/SignIn/BaseSignIn';
79
79
  export { default as SignIn } from './components/presentation/auth/SignIn/SignIn';