From c4cf312c3428b7222bb4aeb3c77be541a3100671 Mon Sep 17 00:00:00 2001 From: Rezaul Karim Shaon Date: Wed, 14 Aug 2024 02:21:17 +0600 Subject: [PATCH 1/2] test: backend - user --- backend/user_api/tests/tests_views.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 backend/user_api/tests/tests_views.py diff --git a/backend/user_api/tests/tests_views.py b/backend/user_api/tests/tests_views.py new file mode 100644 index 0000000..e69de29 From ffcbe7d0854ba0870ac047860a4df3a9401d8149 Mon Sep 17 00:00:00 2001 From: Rezaul Karim Shaon Date: Wed, 14 Aug 2024 02:32:42 +0600 Subject: [PATCH 2/2] frontend: local storage access and refresh token kept --- frontend/src/store/modules/user.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/store/modules/user.js b/frontend/src/store/modules/user.js index 0f6a2f1..fb95f41 100644 --- a/frontend/src/store/modules/user.js +++ b/frontend/src/store/modules/user.js @@ -1,8 +1,5 @@ // src/store/modules/auth.js -// import Vue from 'vue'; -// import Vuex from 'vuex'; - import { login } from "@/services/userAPIService"; const state = { @@ -14,10 +11,14 @@ const mutations = { setTokens(state, { accessToken, refreshToken }) { state.accessToken = accessToken; state.refreshToken = refreshToken; + localStorage.setItem("accessToken", accessToken); + localStorage.setItem("refreshToken", refreshToken); }, clearTokens(state) { state.accessToken = null; state.refreshToken = null; + localStorage.removeItem("accessToken"); + localStorage.removeItem("refreshToken"); }, };