Skip to content

Instantly share code, notes, and snippets.

@m-Phoenix852
Created August 26, 2020 07:45
Show Gist options
  • Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.
Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login(token);
@pxldevv
Copy link

pxldevv commented Jan 2, 2025

Here's the thing about tokens, tokens are device specific, so if you have a token it is the session of one of your clients (maybe your web browser or one of your PCs) and since each session has a different token, if that session clicks log out or is force logged out, that token is invalidated. You can log out all tokens by changing your password aswell as adding certain security measures such as 2fa

@bszura
Copy link

bszura commented Jan 12, 2025

can anyone help me? I wrote this code and in the console I get this:
Wait!
Sentry.06d44c857138cf37dfaa.js:14 If someone told you, if someone did something and pasted it here, there is an 11/10 chance that you will be scammed.
Sentry.06d44c857138cf37dfaa.js:14 Pasting anything here may give others access to your Discord account.
Sentry.06d44c857138cf37dfaa.js:14 Until you know exactly what's dangerous, close the window and stay safe.
Sentry.06d44c857138cf37dfaa.js:14 If you know what you like, welcome to work for us https://discord.com/jobs

@khanji-ideas
Copy link

if it won't let you paste try typing "allow pasting"

@bszura
Copy link

bszura commented Jan 13, 2025

I can only paste it, when I paste it and press enter, it starts loading and suddenly this message appears, I sent it to you earlier

@pxldevv
Copy link

pxldevv commented Jan 13, 2025

@bszura If you'd like I can walk through it with you on discord.

@pxldevv
Copy link

pxldevv commented Jan 13, 2025

If anyone wants help, I'll help you in this discord server.

https://discord.gg/dqMrD4QZgM

@bombshell209
Copy link

bombshell209 commented Jan 15, 2025

Thanks @pxldevv! You helped so much! @eveyone get the best help on their discord https://discord.gg/dqMrD4QZgM

@DuhhMikey
Copy link

hey bro im trying this and like it was working till towmorror but not wen ever i try to login through the token it just send me back to discord login page pls help man and i think its some discord api shit and ive send you friend request pls accept it my Discord username is r4aze_

@pxldevv
Copy link

pxldevv commented Feb 20, 2025

@DuhhMikey i didn't get a friend request, but if you join the server I can help you (most likely your token is invalid)

@pxldevv
Copy link

pxldevv commented Feb 20, 2025

(fyi discord username on my GitHub profile isn't valid anymore and I don't plan on updating it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment