switched to session storage
This commit is contained in:
parent
1377d63347
commit
2121f86a33
@ -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: {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user