From 36a1b67043fcae84104cf9bda1e26dc1f1709c4b Mon Sep 17 00:00:00 2001 From: Gregor Volkmann Date: Sat, 21 Jun 2025 20:00:54 +0200 Subject: [PATCH 1/2] fix formData for production build due to 400 error on dashboard login --- frontend/src/hooks/useAuth.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/useAuth.ts b/frontend/src/hooks/useAuth.ts index 5344493d490..5fb3516dda8 100644 --- a/frontend/src/hooks/useAuth.ts +++ b/frontend/src/hooks/useAuth.ts @@ -43,8 +43,10 @@ const useAuth = () => { const login = async (data: AccessToken) => { const response = await LoginService.loginAccessToken({ - formData: data, - }) + formData: { + username: data.username, + password: data.password, + }) localStorage.setItem("access_token", response.access_token) } From 8e8b26f16700079bd36f33ed69220dfcc6965514 Mon Sep 17 00:00:00 2001 From: Gregor Volkmann Date: Sat, 21 Jun 2025 20:08:34 +0200 Subject: [PATCH 2/2] ammend --- frontend/src/hooks/useAuth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useAuth.ts b/frontend/src/hooks/useAuth.ts index 5fb3516dda8..c3e39ef1a2a 100644 --- a/frontend/src/hooks/useAuth.ts +++ b/frontend/src/hooks/useAuth.ts @@ -46,7 +46,8 @@ const useAuth = () => { formData: { username: data.username, password: data.password, - }) + }, + }) localStorage.setItem("access_token", response.access_token) }