Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› ๏ธ fix(ldap): LDAP_LOGIN_USES_USERNAME config #3472

Merged

Conversation

lidonius1122
Copy link
Contributor

@lidonius1122 lidonius1122 commented Jul 29, 2024

Summary

This PR fixes an issue with the LDAP login configuration where the system was not switching to username input when the LDAP_LOGIN_USES_USERNAME environment variable was set to true. The problem was caused by a missing return statement in the getLdapConfig function in ldap.js. This change ensures that the LDAP configuration is correctly returned when username login is enabled, allowing users to log in with their username as intended.

This PR resolves issue #3471.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

To test this change:

  1. Set LDAP_LOGIN_USES_USERNAME=true in the .env file
  2. Restart the application to ensure the new environment variable is loaded
  3. Navigate to the login page
  4. Attempt to log in
  5. Verify that the login form now accepts a username instead of an email

Test Configuration:

  • LDAP enabled
  • LDAP_LOGIN_USES_USERNAME set to true in .env file

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings

@danny-avila danny-avila changed the title Fix LDAP login to use username when LDAP_LOGIN_USES_USERNAME is true ๐Ÿ› ๏ธ fix(ldap): LDAP_LOGIN_USES_USERNAME config Jul 29, 2024
@danny-avila danny-avila merged commit 3fd2592 into danny-avila:main Jul 29, 2024
1 check passed
@lidonius1122 lidonius1122 deleted the fix/ldap-login-username-config branch July 29, 2024 19:33
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants