diff --git a/Directory.Packages.props b/Directory.Packages.props
index 094d116f89..1cb2ae0b88 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -131,8 +131,8 @@
-
-
+
+
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs
index 109746e34f..b62d3f27ba 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs
@@ -30,7 +30,7 @@ public class AbpAspNetCoreMvcUiThemeSharedModule : AbpModule
{
options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared");
});
-
+
Configure(options =>
{
options
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
index 27f3760000..5d8c15ba40 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
@@ -49,7 +49,8 @@ public class SharedThemeGlobalScriptContributor : BundleContributor
"/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js",
- "/libs/abp/aspnetcore-mvc-ui-theme-shared/date-range-picker/date-range-picker-extensions.js"
+ "/libs/abp/aspnetcore-mvc-ui-theme-shared/date-range-picker/date-range-picker-extensions.js",
+ "/libs/abp/aspnetcore-mvc-ui-theme-shared/authentication-state/authentication-state-listener.js"
});
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/authentication-state/authentication-state-listener.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/authentication-state/authentication-state-listener.js
new file mode 100644
index 0000000000..848760f854
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/authentication-state/authentication-state-listener.js
@@ -0,0 +1,30 @@
+(function () {
+
+ const stateKey = 'authentication-state-id';
+
+ window.addEventListener('load', function () {
+ if (!abp || !abp.currentUser) {
+ return;
+ }
+
+ if (!abp.currentUser.isAuthenticated) {
+ localStorage.removeItem(stateKey);
+ } else {
+ localStorage.setItem(stateKey, abp.currentUser.id);
+ }
+
+ window.addEventListener('storage', function (event) {
+
+ if (event.key !== stateKey || event.oldValue === event.newValue) {
+ return;
+ }
+
+ if (event.oldValue || !event.newValue) {
+ window.location.reload();
+ } else {
+ location.assign('/')
+ }
+ });
+ });
+
+}());
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Authentication/AbpAuthenticationHubFilter.cs b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Authentication/AbpAuthenticationHubFilter.cs
index ab79521159..baac1b538f 100644
--- a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Authentication/AbpAuthenticationHubFilter.cs
+++ b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Authentication/AbpAuthenticationHubFilter.cs
@@ -1,7 +1,9 @@
using System;
+using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
using Volo.Abp.Security.Claims;
namespace Volo.Abp.AspNetCore.SignalR.Authentication;
@@ -11,7 +13,7 @@ public class AbpAuthenticationHubFilter : IHubFilter
public virtual async ValueTask