DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
509 stars 54 forks source link

[Bug] Database Auth - first sign in #482

Closed WojciechKonieczny closed 1 year ago

WojciechKonieczny commented 1 year ago

Environment:

Describe the bug: Hello, I implemented Database Auth in my application. I want users to be able to log into the application, even when the AD domain is offline. I turned on the synchronization of passwords and the attributes I need.

stevebauman commented 1 year ago

Hi @WojciechKonieczny,

What you require is already how the default LdapRecord-Laravel integration works.

Password synchronization only takes effect during user login. A user's password is not synchronized via an ldap:import, as it is impossible to retrieve the users password from the LDAP directory. This means, that a user who has been synchronized into your local application's database, but has not logged in before, cannot login, if the directory is offline.

Users who have logged in before will have their password synchronized, and may login when the LDAP directory is offline (using their last saved password).

I hope this answers your question. Let me know if you require any further clarification.