0
0
Fork 0

Change from localStorage to sessionStorage for the state

This commit is contained in:
Oliver-Akins 2020-08-17 23:17:22 -06:00
parent 8651bf65dd
commit c9c1e57187

View file

@ -46,7 +46,7 @@ export default {
if (this.use_state) { if (this.use_state) {
let state = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); let state = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
params.push(`state=${state}`); params.push(`state=${state}`);
localStorage.setItem(`top-spotify-state`, state); sessionStorage.setItem(this.storage_key.state, state);
}; };
return `${this.auth_base}?${params.join("&")}`; return `${this.auth_base}?${params.join("&")}`;