mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 00:05:50 +03:00
[PR #1273] Allow email-based login for web UI only (LDAP bind remains username-only) #1221
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1273
Author: @Copilot
Created: 9/4/2025
Status: 🔄 Open
Base:
main← Head:copilot/fix-727📝 Commits (3)
6032004Initial plan2d899d5Implement email login functionality - allow login with email addressa825334Fix LDAP bind to not support email login - only allow email login for web UI📊 Changes
1 file changed (+86 additions, -9 deletions)
View changed files
📝
crates/sql-backend-handler/src/sql_opaque_handler.rs(+86 -9)📄 Description
This PR implements email-based login functionality for the web UI to provide consistent behavior between the login form and password reset form, while maintaining LDAP standards compliance.
Problem
Users could reset their password using either their username or email address, but the login form only accepted usernames. This created an inconsistent user experience where users might receive a password reset email but then be unable to log in using the same email address they used for the reset.
Solution
Modified the web UI login system to support email-based authentication while keeping LDAP bind operations username-only:
Implementation Details
OpaqueHandler::login_startmethod (used for web UI) to support email loginfind_user_id_by_emailhelper method that uses existingUserRequestFilter::Equality(UserColumn::Email, ...)LoginHandler::bindmethod (used for LDAP operations) remains unchanged and username-onlyExample Usage
LDAP clients (unchanged behavior):
Web UI can now use either format:
OR
The email-based login works for:
Testing
Fixes #727.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.