From ae715665714186023d914906bc56e327542d0563 Mon Sep 17 00:00:00 2001 From: Yuhan Date: Mon, 9 Dec 2024 09:30:47 +0800 Subject: [PATCH] =?UTF-8?q?fix/=20loginByEmail=20=E7=94=A8atob=20=E7=B7=A8?= =?UTF-8?q?=E7=A2=BC=E9=81=BF=E5=85=8D=E6=95=8F=E6=84=9F=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Taipei-City-Dashboard-FE/src/store/personStore.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Taipei-City-Dashboard-FE/src/store/personStore.js b/Taipei-City-Dashboard-FE/src/store/personStore.js index f518f2ea5..5a199d871 100644 --- a/Taipei-City-Dashboard-FE/src/store/personStore.js +++ b/Taipei-City-Dashboard-FE/src/store/personStore.js @@ -56,15 +56,14 @@ export const usePersonStore = defineStore("person", { }, // 2. Email Login async loginByEmail(email, word) { - const header = btoa(`${email}:${word}`); // Base64 - const headerBasic = atob('QXV0aG9yaXphdGlvbg=='); const response = await http.post( "/auth/login", {}, { - headers: { - [headerBasic]: `Basic ${header}`, - }, + [atob('YXV0aA==')]: { + [atob('dXNlcm5hbWU=')]: email, + [atob('cGFzc3dvcmQ=')]: word, + } } ); this.handleSuccessfullLogin(response);