So I am making a website with logins that you need to contact me to obtain (to avoid spam bots and stuff) however I do not know how to hide the passwords, here is a code of all JavaScript I use for the site:
//specials
const enabledUsers = ['adminAccount', 'POGDUCKIE']
const unc = "adminAccount"
const pwc = "TEST"
const unc2 = "POGDUCKIE"
const pwc2 = "TEST"
const unc3 = "fierytech"
const pwc3 = "TEST"
const member = ['POGDUCKIE']
const partner = ['none yet']
const admin = ['adminAccount']
const owner = ['fierytech']
var user = document.getElementById("user")
function redirectAddAurasouls(){
document.write("Here is the bot invite link: <a href=https://discord.com/api/oauth2/authorize?client_id=944639749195448320&permissions=8&scope=bot>https://discord.com/api/oauth2/authorize?client_id=944639749195448320&permissions=8&scope=bot</a>. Thank you for adding aurasouls!<br><br><button onclick=location.reload()>Go Back</button>")
}
function redirectDiscordInvite(){
document.write("The Discord Support Server Invite Link Is: <a target=blank_ href=https://discord.gg/khR9DFNqs6>https://discord.gg/khR9DFNqs6</a><br><button onclick=location.reload()>Go Back</button>");
}
function redirectStaff(){
document.getElementById("passwordTable").style.display = "none";
}
function passwordCheck(){
var pw = document.getElementById("Password").value;
var un = document.getElementById("Username").value;
if(un == unc) {
if(pw == pwc){
redirectStaff()
user.innerHTML = "adminAccount"
}
else{
document.getElementById("passwordStatus").innerHTML = "Incorrect Password. Please try again.";
}
}
else{
if(un == unc2) {
if(pw == pwc2){
redirectStaff()
user.innerHTML = "POGDUCKIE"
}
else{
document.getElementById("passwordStatus").innerHTML = "Incorrect Password. Please try again.";
}
}
else{
document.getElementById("passwordStatus").innerHTML = "Incorrect Username. Please contact FieryTech on discord to get a free login.";
}
}
}
//the code below stops user from opening console
document.onkeydown = function(e) {
if(event.keyCode == 123) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
return false;
}
}
As you can see, the JS file has something to prevent users opening console with keybinds, but the user can still access inspect element in other ways. Is there a way I can externally store the data so only the javascript code can access it so users can't steal logins? If there is any way possible to hide these logins please let me know.
Thanks
P.S. before you say that some of the JS doesn't work, I stopped working on the login until I find a way to properly store logins.