undiscord
undiscord copied to clipboard
How does it get the token from localstorage?
How does the popup get access to the local storage token? I cannot find any line in the html that would populate the local storage. Please help me understand how.
here is the relevant code
$('button#getToken').onclick = e => {
window.dispatchEvent(new Event('beforeunload'));
$('input#authToken').value = JSON.parse(popup.localStorage.token);
};
It's parsing a JSON file, not HTML. You can see the JSON file that it is parsing by accessing the developer tools that ship with your browser and navigating to the "local storage" tab.
I get that. But the local storage does not contain the token on Discord. But for some reason the token appears in the popup's localstorage. That's what I don't get.