Sign in with a directory account: LDAP and Active Directory (#286)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
A server for a school or organisation can let people sign in with their directory accounts. With LDAP_URL set (ldaps://, or ldap:// with LDAP_STARTTLS=1), /login offers "Sign in with ": the server finds the account with its service account (LDAP_BIND_DN, LDAP_BASE_DN, LDAP_USER_FILTER with the name escaped per RFC 4515, optionally LDAP_REQUIRED_GROUP), then binds as it with the typed password, which is never kept. Empty passwords are refused before anything is sent. A directory account is the identity 'ldap', keyed by objectGUID or entryUUID. A first sign-in creates an account named after the directory account when that name is free, which confirms an email and gives a year of birth like a new social account. It shares password sign-in's rate limits and challenges, links on the account page and unlinks like a provider. The server refuses to start with an incomplete or unsafe configuration. ldapts 9.2.0 (MIT) is the client. test/ldap-postgres.mjs runs against a real OpenLDAP container in CI. Microsoft 365 schools without LDAP are #292. Closes #286 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/156c7ee4cf5a83254a61f1df725954bc3c7cb893
Related
Open Sign in with a directory account: LDAP and Active Directory (#286) in the timeline