acsi-core 0.9.21 → 0.9.22
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.
- package/dist/components/MSALRedirectHandler/index.d.ts +5 -2
- package/dist/containers/Login/configs/constants.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +293 -124
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +289 -126
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/msalInstance.d.ts +38 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPublicClientApplication, AccountInfo, AuthenticationResult } from "@azure/msal-browser";
|
|
2
|
+
/**
|
|
3
|
+
* Get or create the MSAL singleton instance
|
|
4
|
+
* @param clientId - Microsoft client ID (optional, uses env if not provided)
|
|
5
|
+
* @param redirectUri - Redirect URI (optional, uses env if not provided)
|
|
6
|
+
* @returns MSAL instance
|
|
7
|
+
*/
|
|
8
|
+
export declare const getMSALInstance: (clientId?: string | undefined, redirectUri?: string | undefined) => IPublicClientApplication | null;
|
|
9
|
+
/**
|
|
10
|
+
* Initialize the MSAL instance
|
|
11
|
+
* @param clientId - Microsoft client ID (optional)
|
|
12
|
+
* @param redirectUri - Redirect URI (optional)
|
|
13
|
+
* @returns Promise that resolves when initialization is complete
|
|
14
|
+
*/
|
|
15
|
+
export declare const initializeMSAL: (clientId?: string | undefined, redirectUri?: string | undefined) => Promise<IPublicClientApplication | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Handle MSAL redirect promise
|
|
18
|
+
* This should be called as early as possible, before React Router processes the URL
|
|
19
|
+
* @param clientId - Microsoft client ID (optional)
|
|
20
|
+
* @param redirectUri - Redirect URI (optional)
|
|
21
|
+
* @returns Promise with authentication result or null
|
|
22
|
+
*/
|
|
23
|
+
export declare const handleMSALRedirect: (clientId?: string | undefined, redirectUri?: string | undefined) => Promise<AuthenticationResult | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Check if current URL contains MSAL redirect parameters
|
|
26
|
+
* @returns true if MSAL redirect detected
|
|
27
|
+
*/
|
|
28
|
+
export declare const isMSALRedirect: () => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Get all accounts from MSAL cache
|
|
31
|
+
* @returns Array of account info
|
|
32
|
+
*/
|
|
33
|
+
export declare const getAllAccounts: () => AccountInfo[];
|
|
34
|
+
/**
|
|
35
|
+
* Get active account
|
|
36
|
+
* @returns Active account or null
|
|
37
|
+
*/
|
|
38
|
+
export declare const getActiveAccount: () => AccountInfo | null;
|