From 9948163e6ee94a1ba230e67e1bbc0881ffcd6e2d Mon Sep 17 00:00:00 2001
From: Anbraten <6918444+anbraten@users.noreply.github.com>
Date: Tue, 23 Jul 2024 13:46:22 +0200
Subject: [PATCH] Fix login via navbar (#3962)
---
web/src/components/layout/header/Navbar.vue | 6 +-----
web/src/compositions/useAuthentication.ts | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/web/src/components/layout/header/Navbar.vue b/web/src/components/layout/header/Navbar.vue
index f4092a1c7..59a869ba7 100644
--- a/web/src/components/layout/header/Navbar.vue
+++ b/web/src/components/layout/header/Navbar.vue
@@ -31,7 +31,7 @@
-
+
@@ -55,10 +55,6 @@ const authentication = useAuthentication();
const { user } = authentication;
const apiUrl = `${config.rootPath ?? ''}/swagger/index.html`;
-function doLogin() {
- authentication.authenticate(route.fullPath);
-}
-
const { enableSwagger } = config;
diff --git a/web/src/compositions/useAuthentication.ts b/web/src/compositions/useAuthentication.ts
index 35e6b510e..8ca3df563 100644
--- a/web/src/compositions/useAuthentication.ts
+++ b/web/src/compositions/useAuthentication.ts
@@ -12,6 +12,6 @@ export default () =>
const config = useUserConfig();
config.setUserConfig('redirectUrl', url);
}
- window.location.href = `${useConfig().rootPath}/authorize?forge_id=${forgeId}`;
+ window.location.href = `${useConfig().rootPath}/authorize?${forgeId !== undefined ? `forgeId=${forgeId}` : ''}`;
},
}) as const;