Login to Discord with browser console

Viewed 291

How can I login to https://discord.com/login with the browser console.

I can set the the value on the input fields with these queries.

document.querySelector('input[name="email"]').value = 'test@gmail.com';
document.querySelector('input[name="password"]').value = 'test123';

And click the login button with this query

document.querySelectorAll("button[type='submit']")[0].click();

But then it just clears both field and says that the password is a required field.

Any help is appreciated.

Thanks Anders

1 Answers
let element = document.getElementsByName('email');
element[0].focus();
document.execCommand('insertText', false, '##YOUR_EMAIL##');
element = document.getElementsByName('password');
element[0].focus();
document.execCommand('insertText', false, '##YOUR_PASSWORD##');
document.getElementsByClassName('marginBottom8-emkd0_ button-1cRKG6 button-f2h6uQ lookFilled-yCfaCM colorBrand-I6CyqQ sizeLarge-3mScP9 fullWidth-fJIsjq grow-2sR_-F')[0].click();
Related