improve: never automatically create an account for webui client

This commit is contained in:
Sainan 2024-05-06 09:28:26 +02:00
parent 9bded04dfd
commit bcbd2c7f0d
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ const loginController: RequestHandler = async (request, response) => {
const account = await Account.findOne({ email: loginRequest.email }); //{ _id: 0, __v: 0 } const account = await Account.findOne({ email: loginRequest.email }); //{ _id: 0, __v: 0 }
if (!account && config.autoCreateAccount) { if (!account && config.autoCreateAccount && loginRequest.ClientType != "webui") {
try { try {
const newAccount = await createAccount({ const newAccount = await createAccount({
email: loginRequest.email, email: loginRequest.email,

View File

@ -15,7 +15,7 @@ function loginFromLocalStorage() {
s: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==", // signature of some kind s: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==", // signature of some kind
lang: "en", lang: "en",
date: 1501230947855458660, // ??? date: 1501230947855458660, // ???
ClientType: "", ClientType: "webui",
PS: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==" // anti-cheat data PS: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==" // anti-cheat data
}) })
}); });