I found these solutions: the first one is more concise if you already have some experience with LDAP, and the second one provides a detailed step-by-step guide.
1- https://github.com/sbrannstrom/nestjs-passport-ldap-example
2 - https://blog.stackademic.com/building-a-secure-nestjs-application-with-jwt-typeorm-postgresql-and-ldap-server-1ac5249dae53"