chore: add extra information in the error logging that may be insecure

This commit is contained in:
SeDemal
2024-09-09 16:38:40 +02:00
parent 6a7532b5b7
commit 4ee05a9355

View File

@@ -38,9 +38,9 @@ const ldapLogin = (username: string, password: string) =>
const client = ldap.createClient({
url: env.AUTH_LDAP_URI,
});
client.bind(username, password, (error, res) => {
client.bind(username, password, (error) => {
if (error) {
reject('Invalid username or password');
reject(`Invalid username or password. ${error.code}-${error.name}:${error.message}`);
} else {
resolve(client);
}