diff --git a/flow-server/src/main/java/com/vaadin/flow/server/auth/NavigationAccessControl.java b/flow-server/src/main/java/com/vaadin/flow/server/auth/NavigationAccessControl.java index 4f76c095d1a..a33042392f8 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/auth/NavigationAccessControl.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/auth/NavigationAccessControl.java @@ -187,6 +187,10 @@ public final boolean isEnabled() { * the Flow view to use as login view */ public final void setLoginView(Class loginView) { + if (loginView == this.loginView) { + // Probably hot reload + return; + } throwIfLoginViewSet(); this.loginView = loginView; } @@ -210,6 +214,11 @@ protected Class getLoginView() { * the frontend view to use as login view */ public void setLoginView(String loginUrl) { + if (loginUrl == this.loginUrl) { + // Probably hot reload + return; + } + throwIfLoginViewSet(); this.loginUrl = loginUrl; }