diff --git a/frontend/src/components/CreateSecret.vue b/frontend/src/components/CreateSecret.vue index a656343..53e8b08 100644 --- a/frontend/src/components/CreateSecret.vue +++ b/frontend/src/components/CreateSecret.vue @@ -46,7 +46,7 @@ export default { methods: { async createSecret() { const url = `${this.apiBaseUrl}/secret`; - const token = localStorage.getItem("token"); + const token = sessionStorage.getItem("token"); const requestOptions = { method: "POST", headers: { diff --git a/frontend/src/components/HomePage.vue b/frontend/src/components/HomePage.vue index d36741c..64fbe9f 100644 --- a/frontend/src/components/HomePage.vue +++ b/frontend/src/components/HomePage.vue @@ -49,7 +49,7 @@ export default { if ("message" in response) { if (response.message === "authenticated") { const token = response.accessToken; - localStorage.setItem("token", token); + sessionStorage.setItem("token", token); this.$emit("loggedin", true); } }