0
0
Fork 0

Compare state if in production mode

This commit is contained in:
Tyler-A 2020-07-30 21:49:19 -06:00
parent 6d3164f5be
commit 40c72fef95

View file

@ -41,23 +41,21 @@ export default {
// Check to ensure the authorization was a success // Check to ensure the authorization was a success
if (params.get(`access_token`)) { if (params.get(`access_token`)) {
// this.get_user()
// // Check if we compare state // Check if we compare state
// if (this.use_state) { if (process.env.NODE_ENV === `production`) {
// // Compare given state to localstorage state // Compare given state to localstorage state
// let LS_state = localStorage.getItem(`top-spotify-state`); let LS_state = localStorage.getItem(`top-spotify-state`);
// if (LS_state == params.get(`state`)) { if (LS_state == params.get(`state`)) {
// console.info(`State compare success`) console.info(`State compare success`)
// return true
// }
// console.error(`State compare failed`)
// return false
// } else {
// return true
// }
return true return true
}
console.error(`State compare failed`)
return false
} else {
return true
}
} else { } else {
let error = (new URLSearchParams(window.location.search)).get(`error`) let error = (new URLSearchParams(window.location.search)).get(`error`)