diff --git a/core/commons/che-core-commons-gwt/src/main/java/org/eclipse/che/security/oauth/JsOAuthWindow.java b/core/commons/che-core-commons-gwt/src/main/java/org/eclipse/che/security/oauth/JsOAuthWindow.java index 7e1e121a12..9214ab410e 100644 --- a/core/commons/che-core-commons-gwt/src/main/java/org/eclipse/che/security/oauth/JsOAuthWindow.java +++ b/core/commons/che-core-commons-gwt/src/main/java/org/eclipse/che/security/oauth/JsOAuthWindow.java @@ -76,7 +76,7 @@ public class JsOAuthWindow { if (href) { var path = popupWindow.location.pathname; - if (path == (authUrl.substring(authUrl.lastIndexOf("/ws"))) || path == "/dashboard/") { + if (path.startsWith("/ws/") || path.startsWith("/dashboard/")) { instance.@org.eclipse.che.security.oauth.JsOAuthWindow::setAuthenticationStatus(I)(3); popupWindow.close(); popupWindow = null;