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);
Copy link

ghost commented Nov 28, 2021

Is it possible to log out through console?

Yes, paste this as it is

function logout() {
    setInterval(() => {
      document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `""`
    }, 50);
    setTimeout(() => {
      location.reload();
    }, 2500);
  }

logout();

it erases the token and reloads

Copy link

ghost commented Jan 8, 2022

i've seen this in pastebin before. https://pastebin.com/GuDC58Bh

Who cares?

Copy link

ghost commented Jan 17, 2022

ok

@RgiCieZje
Copy link

It is still working?
For some reason, it don't work for me

@AndyIsHereBoi
Copy link

AndyIsHereBoi commented Jan 17, 2022 via email

@laith00x
Copy link

laith00x commented Feb 5, 2022

is there a similar method for instagram?

Copy link

ghost commented Feb 10, 2022

@laith00x use cookies

@hoemotion
Copy link

I must have alzheimer‘s, cuz i dont remember asking 🥱

@182exe
Copy link

182exe commented Feb 28, 2022

alright ill delete my comment

@depss
Copy link

depss commented Mar 7, 2022

this comment section makes me laugh lmfao, its not a logger for taking tokens its a way to log in with a token, its not patched i literally tested it today, and just the fact that you ppl are having a hard time copy and pasting some js into the console is sad lmao

@lordminecraft12
Copy link

it's not work anymore, ithink it's patched plz update the script...

nah u just dont know how to use it

@RomainSchmit
Copy link

Hi guys, thanks for the order but I have a problem, discord asks me to verify my number (I can't do it at all even with other numbers, the assistant at discord told me there was no solution...) do you know how I could bypass it?

@MonsterGaming9845
Copy link

it doesnt work it keeps showing 400 errors

Token might be wrong.

@XX-Crafter-XX
Copy link

I don't think this method of logging in works anymore, it was patched sometime in August 2021, as far as I can tell

Yes, I thought to myself! Only blocks Firefox the process, not Discord itself!

Can i then do it whit chrome or do i need vpn or something

@XX-Crafter-XX
Copy link

this comment section makes me laugh lmfao, its not a logger for taking tokens its a way to log in with a token, its not patched i literally tested it today, and just the fact that you ppl are having a hard time copy and pasting some js into the console is sad lmao
HOW DO U DO IT SEND ME UR SCRIPT AND WHAT BROWSER DO U USE

@rfwn
Copy link

rfwn commented Apr 24, 2022

works. 4/2022 (non mfa token)

@clevef
Copy link

clevef commented Apr 29, 2022

Uncaught TypeError: document.body.appendChild(...) is undefined

@991cz
Copy link

991cz commented Apr 30, 2022

It is still working? For some reason, it don't work for me

come discord I'll explain u cz#9999

@githubcommonid
Copy link

I don't think this is an issue of not pasting the code correctly since that's a task everyone should be able to do, many people get the same 401 error message, I read somewhere that this might be a firewall blocking the log in, I have the same issues, did anybody fix it?

Copy link

ghost commented May 8, 2022

I don't think this is an issue of not pasting the code correctly since that's a task everyone should be able to do, many people get the same 401 error message, I read somewhere that this might be a firewall blocking the log in, I have the same issues, did anybody fix it?

401 == Invalid Token, the script is working fine the issue is on your end

@githubcommonid
Copy link

Well I was just testing this by my own, and I used my own token that I copied just a few seconds before I tried to log in with it, while I was logged in on web, under the application tab in the dev-tools. I am pretty sure that is the most valid way to get your token, since you are literally logged in with it

@mothervoid
Copy link

Is there any way to reset the password of an account you’re logged into? Lost my 2FA account and can’t remember my password to look at backup codes, and of course discord is no help at all even though I can provide proof I own the account — :) so I'm basically a crash away from losing my account.

@bruhub912
Copy link

Is there any way to reset the password of an account you’re logged into? Lost my 2FA account and can’t remember my password to look at backup codes, and of course discord is no help at all even though I can provide proof I own the account — :) so I'm basically a crash away from losing my account.

whats why you can download them

@mothervoid
Copy link

Is there any way to reset the password of an account you’re logged into? Lost my 2FA account and can’t remember my password to look at backup codes, and of course discord is no help at all even though I can provide proof I own the account — :) so I'm basically a crash away from losing my account.

whats why you can download them

I was dumb and didn’t do it when I set up 2FA, assumed I’d probably never need it. And now of course I can’t look at or download them without my password — that I can’t seem to remember :’)

@Moomoomankers
Copy link

Does it still work? It keeps saying "invalid" with no code before or after whenever I try, could anyone help me out?

@crowwd
Copy link

crowwd commented May 26, 2022

you could just change your token in your local storage and refresh

@stretch07
Copy link

i believe webpack pushed an update and your token is no longer in localstorage, can anyone confirm?

@Hynes1154
Copy link

@its-pablo believe so too, it says version nine or smth and has a red code, build weird since i could get thee token but could not use to login

@Hynes1154
Copy link

waiting on any new methods.

@crowwd
Copy link

crowwd commented Jul 4, 2022

i believe webpack pushed an update and your token is no longer in localstorage, can anyone confirm?

image

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