switched to session storage
This commit is contained in:
parent
1377d63347
commit
2121f86a33
@ -46,7 +46,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async createSecret() {
|
async createSecret() {
|
||||||
const url = `${this.apiBaseUrl}/secret`;
|
const url = `${this.apiBaseUrl}/secret`;
|
||||||
const token = localStorage.getItem("token");
|
const token = sessionStorage.getItem("token");
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -49,7 +49,7 @@ export default {
|
|||||||
if ("message" in response) {
|
if ("message" in response) {
|
||||||
if (response.message === "authenticated") {
|
if (response.message === "authenticated") {
|
||||||
const token = response.accessToken;
|
const token = response.accessToken;
|
||||||
localStorage.setItem("token", token);
|
sessionStorage.setItem("token", token);
|
||||||
this.$emit("loggedin", true);
|
this.$emit("loggedin", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user