diff --git a/core/src/Authorization.html b/core/src/Authorization.html
index b4fd0d1cda..c9c78489ce 100644
--- a/core/src/Authorization.html
+++ b/core/src/Authorization.html
@@ -232,9 +232,9 @@
checkAuth(idpProviderSettings);
})
.catch(err => {
- console.error(
- `Could not instantate ${idpProviderName} provider : ${err}`
- );
+ const errorMsg = `Error: ${err.message || err}`;
+ console.error(errorMsg, err.message && err);
+ LuigiConfig.setErrorMessage(errorMsg);
});
}
checkAuth(idpProviderSettings);
diff --git a/core/src/core-api/auth.js b/core/src/core-api/auth.js
index 9eab4c9b79..cc235c5a69 100644
--- a/core/src/core-api/auth.js
+++ b/core/src/core-api/auth.js
@@ -10,11 +10,7 @@ class LuigiAuthManager {
* @returns {boolean} returns true if authorization is enabled. Otherwise returns false.
*/
isAuthorizationEnabled() {
- const idpProviderName = config.getConfigValue('auth.use');
- const idpProviderSettings = config.getConfigValue(
- `auth.${idpProviderName}`
- );
- return !!idpProviderSettings;
+ return !!config.getConfigValue('auth.use');
}
async handleAuthEvent(
diff --git a/core/src/core-api/config.js b/core/src/core-api/config.js
index a39343dd24..5cd930cc6d 100644
--- a/core/src/core-api/config.js
+++ b/core/src/core-api/config.js
@@ -9,14 +9,14 @@ class LuigiConfigManager {
id: undefined
};
- this.configReadyCallback = function() {};
+ this.configReadyCallback = function () { };
}
setConfigCallbacks(configReadyCallback) {
this.configReadyCallback = configReadyCallback;
this.configReadyTimeout.id = setTimeout(() => {
// Avoid Luigi initialization if timeout reached
- this.configReadyCallback = function() {};
+ this.configReadyCallback = function () { };
this.configNotReadyCallback();
}, this.configReadyTimeout.valueMs);
}
@@ -35,6 +35,10 @@ class LuigiConfigManager {
const errorMsg =
'Ups.. Looks like Luigi was not configured. Please use Luigi.setConfig(config) function to configure Luigi.';
console.error(errorMsg);
+ this.setErrorMessage(errorMsg);
+ }
+
+ setErrorMessage(errorMsg) {
var errorTextNode = document.createTextNode(errorMsg);
var fd_ui = document.createElement('div');
fd_ui.setAttribute('class', 'fd-ui');
diff --git a/core/src/core-api/index.js b/core/src/core-api/index.js
index 8662fd3594..5af39d93ec 100644
--- a/core/src/core-api/index.js
+++ b/core/src/core-api/index.js
@@ -5,7 +5,4 @@ export const LuigiConfig = config;
export const LuigiAuth = auth;
// Expose it window for user app to call Luigi.setConfig()
-window.Luigi = Object.assign(
- config,
- auth
-);
+window.Luigi = Object.assign(config, auth);
diff --git a/core/src/navigation/TopNav.html b/core/src/navigation/TopNav.html
index a8ef941fac..b9714d5b3d 100644
--- a/core/src/navigation/TopNav.html
+++ b/core/src/navigation/TopNav.html
@@ -1,4 +1,4 @@
-