From cc14c710c44d92c0616511bf4846a550e5e256d2 Mon Sep 17 00:00:00 2001 From: MRmlik12 Date: Thu, 17 Jun 2021 17:19:17 +0200 Subject: [PATCH] Fix CORS credentials --- frontend/src/api/login.ts | 1 + frontend/src/components/Login/UserLogin.vue | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/api/login.ts b/frontend/src/api/login.ts index bd51e79..1d98d35 100644 --- a/frontend/src/api/login.ts +++ b/frontend/src/api/login.ts @@ -18,6 +18,7 @@ export default { Symbol: symbol, diaryUrl, }, + withCredentials: true, }); document.cookie = response.headers['Set-Cookie']; diff --git a/frontend/src/components/Login/UserLogin.vue b/frontend/src/components/Login/UserLogin.vue index f259b7e..f273107 100644 --- a/frontend/src/components/Login/UserLogin.vue +++ b/frontend/src/components/Login/UserLogin.vue @@ -71,9 +71,7 @@ export default Vue.extend({ const index = diary.diaries.findIndex((item) => item.name === this.selectedDiary); const response = await login.login(this.login, this.password, 'powiatwulkanowy', diary.diaries[index].url); - console.log(response); this.$store.state.loginData = response.data; - console.log(this.$store.state.loginData); if (this.$store.state.loginData.data.students.data.length > 1) { this.$store.state.isLoading = false;