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);