acsi-core 0.9.26 → 0.9.27
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/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2976,25 +2976,30 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2976
2976
|
return;
|
|
2977
2977
|
}
|
|
2978
2978
|
console.log('[MSAL] BlockLogin: Initializing MSAL instance...');
|
|
2979
|
-
return Promise.resolve(initializeMSAL(MICROSOFT_CLIENT_ID, MICROSOFT_URL_DIRECT)).then(function () {
|
|
2979
|
+
return Promise.resolve(initializeMSAL(MICROSOFT_CLIENT_ID, MICROSOFT_URL_DIRECT)).then(function (initializedInstance) {
|
|
2980
2980
|
var _exit = false;
|
|
2981
|
-
function _temp4(
|
|
2982
|
-
if (_exit) return
|
|
2981
|
+
function _temp4(_result4) {
|
|
2982
|
+
if (_exit) return _result4;
|
|
2983
2983
|
console.log('[MSAL] BlockLogin: Calling loginRedirect with request:', loginRequest);
|
|
2984
2984
|
console.log('[MSAL] BlockLogin: MSAL instance state:', {
|
|
2985
|
-
accounts:
|
|
2985
|
+
accounts: initializedInstance.getAllAccounts().length
|
|
2986
2986
|
});
|
|
2987
|
-
return Promise.resolve(
|
|
2987
|
+
return Promise.resolve(initializedInstance.loginRedirect(loginRequest)).then(function () {
|
|
2988
2988
|
console.log('[MSAL] BlockLogin: loginRedirect called - redirect should happen');
|
|
2989
2989
|
});
|
|
2990
2990
|
}
|
|
2991
|
+
if (!initializedInstance) {
|
|
2992
|
+
console.error("[MSAL] BlockLogin: Failed to initialize MSAL instance");
|
|
2993
|
+
alert("Failed to initialize Microsoft login. Please try again.");
|
|
2994
|
+
return;
|
|
2995
|
+
}
|
|
2991
2996
|
console.log('[MSAL] BlockLogin: MSAL instance initialized successfully');
|
|
2992
2997
|
var loginRequest = {
|
|
2993
2998
|
scopes: ["openid", "profile", "User.Read"],
|
|
2994
2999
|
prompt: "select_account"
|
|
2995
3000
|
};
|
|
2996
3001
|
var _temp3 = _catch(function () {
|
|
2997
|
-
return Promise.resolve(
|
|
3002
|
+
return Promise.resolve(initializedInstance.handleRedirectPromise()).then(function (redirectResponse) {
|
|
2998
3003
|
if (redirectResponse) {
|
|
2999
3004
|
console.log('[MSAL] BlockLogin: Found pending redirect response, processing...');
|
|
3000
3005
|
if (redirectResponse.account) {
|
|
@@ -3015,8 +3020,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
3015
3020
|
}
|
|
3016
3021
|
}
|
|
3017
3022
|
});
|
|
3018
|
-
}, function (
|
|
3019
|
-
console.log('[MSAL] BlockLogin: No pending redirect to handle
|
|
3023
|
+
}, function () {
|
|
3024
|
+
console.log('[MSAL] BlockLogin: No pending redirect to handle (this is normal)');
|
|
3020
3025
|
});
|
|
3021
3026
|
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
3022
3027
|
});
|