bug fixed + add support for google profile pics

This commit is contained in:
daniel31x13
2024-05-07 16:59:00 -04:00
parent 2dd49ff844
commit 861f8e55f4
8 changed files with 100 additions and 37 deletions
@@ -25,8 +25,10 @@ export default async function deleteUserById(
};
}
// Then, we check if the provided password matches the one stored in the database (disabled in Keycloak integration)
if (!keycloakEnabled && !authentikEnabled && !isServerAdmin) {
// Then, we check if the provided password matches the one stored in the database (disabled in SSO/OAuth integrations)
if (user.password && !isServerAdmin) {
console.log("isServerAdmin", isServerAdmin);
console.log("isServerAdmin", body.password);
const isPasswordValid = bcrypt.compareSync(
body.password,
user.password as string