Compare state if in production mode
This commit is contained in:
parent
6d3164f5be
commit
40c72fef95
1 changed files with 13 additions and 15 deletions
28
src/App.vue
28
src/App.vue
|
|
@ -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
|
return true
|
||||||
// }
|
}
|
||||||
// console.error(`State compare failed`)
|
console.error(`State compare failed`)
|
||||||
// return false
|
return false
|
||||||
// } else {
|
} else {
|
||||||
// return true
|
return true
|
||||||
// }
|
}
|
||||||
return true
|
|
||||||
} else {
|
} else {
|
||||||
let error = (new URLSearchParams(window.location.search)).get(`error`)
|
let error = (new URLSearchParams(window.location.search)).get(`error`)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue