@aakash58/chatbot 1.1.7 → 1.1.9
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.
|
@@ -569,6 +569,7 @@ class AuthService {
|
|
|
569
569
|
resolveSilentToken() {
|
|
570
570
|
const commonKeys = ['access_token', 'id_token', 'token', 'authToken'];
|
|
571
571
|
const configuredKey = this.config?.autoConfigFromStorage;
|
|
572
|
+
Logger.info(`[Auth] Resolving token from storage with configured key: ${configuredKey}`);
|
|
572
573
|
// Try configured storage key (both localStorage and sessionStorage)
|
|
573
574
|
if (configuredKey) {
|
|
574
575
|
const token = localStorage.getItem(configuredKey) || sessionStorage.getItem(configuredKey);
|
|
@@ -582,6 +583,7 @@ class AuthService {
|
|
|
582
583
|
const token = localStorage.getItem(key) || sessionStorage.getItem(key);
|
|
583
584
|
if (token) {
|
|
584
585
|
Logger.debug(`[Auth] Resolved token from fallback key: ${key}`);
|
|
586
|
+
Logger.info(`[Auth] Resolved token from fallback key: ${token}`);
|
|
585
587
|
return token;
|
|
586
588
|
}
|
|
587
589
|
}
|
|
@@ -4487,8 +4489,8 @@ class Doohbot extends DoohbotInput {
|
|
|
4487
4489
|
buttonStyle: this.buttonStyle || this.config.buttonStyle,
|
|
4488
4490
|
});
|
|
4489
4491
|
}
|
|
4490
|
-
// Handle dynamic
|
|
4491
|
-
if (
|
|
4492
|
+
// Handle dynamic config updates for authentication
|
|
4493
|
+
if (!this.isAuthenticated()) {
|
|
4492
4494
|
this.onFederatedLogin(this.config.authToken);
|
|
4493
4495
|
}
|
|
4494
4496
|
}
|