Allow to automatically confirm LDAP emails #1140

Closed
opened 2026-02-04 23:57:31 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @MorrisJobke on GitHub (Apr 12, 2019).

Currently LDAP users need to re-confirm it's email address. It would make sense to also have an LDAP_AUTO_CONFIRM_EMAIL setting that overwrites the default in 257a5a23ec/app/Providers/LdapUserProvider.php (L119).

Does that make sense? And how to best inject the config setting into that code path? Should it be passed in via the constructor of the LdapUserProvider class?

Originally created by @MorrisJobke on GitHub (Apr 12, 2019). Currently LDAP users need to re-confirm it's email address. It would make sense to also have an `LDAP_AUTO_CONFIRM_EMAIL` setting that overwrites the default in https://github.com/BookStackApp/BookStack/blob/257a5a23ecaf7ce779969d575ff8a0b976181d13/app/Providers/LdapUserProvider.php#L119. Does that make sense? And how to best inject the config setting into that code path? Should it be passed in via the constructor of the `LdapUserProvider` class?
OVERLORD added the 🚪 Authentication🏭 Back-End labels 2026-02-04 23:57:31 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 12, 2019):

Hi @MorrisJobke,

Just to double check, Are you using LDAP along with another non-trusted authentication method, where domain restriction or email confirmations is necessary? Otherwise, If not, I think you could just disable those options in the settings if my thinking is correct?

Should it be passed in via the constructor of the LdapUserProvider class?

If this is something that needs to be added, It may be better for the LdapUserProvider to ask the LdapService if email confirmation is required, since LdapService already handles config management whereas LdapUserProvider does not.

@ssddanbrown commented on GitHub (Apr 12, 2019): Hi @MorrisJobke, Just to double check, Are you using LDAP along with another non-trusted authentication method, where domain restriction or email confirmations is necessary? Otherwise, If not, I think you could just disable those options in the settings if my thinking is correct? > Should it be passed in via the constructor of the LdapUserProvider class? If this is something that needs to be added, It may be better for the `LdapUserProvider` to ask the `LdapService` if email confirmation is required, since `LdapService` already handles config management whereas `LdapUserProvider` does not.
Author
Owner

@MorrisJobke commented on GitHub (Apr 12, 2019):

Just to double check, Are you using LDAP along with another non-trusted authentication method, where domain restriction or email confirmations is necessary? Otherwise, If not, I think you could just disable those options in the settings if my thinking is correct?

Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay?

@MorrisJobke commented on GitHub (Apr 12, 2019): > Just to double check, Are you using LDAP along with another non-trusted authentication method, where domain restriction or email confirmations is necessary? Otherwise, If not, I think you could just disable those options in the settings if my thinking is correct? Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay?
Author
Owner

@MorrisJobke commented on GitHub (Apr 12, 2019):

Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay?

Tested, but there is no new setting in the web UI config. Where can this be typically found?

@MorrisJobke commented on GitHub (Apr 12, 2019): > Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay? Tested, but there is no new setting in the web UI config. Where can this be typically found?
Author
Owner

@ssddanbrown commented on GitHub (Apr 12, 2019):

Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay?

Created content will stay but the name will be removed from activity. Alternatively, once LDAP is enabled, you can set a user's 'External Auth ID' (Or something like that) on their profile which is what's used to match a user during LDAP login.

Tested, but there is no new setting in the web UI config. Where can this be typically found?

Below are the settings I was referring to in my above comment, Using/Enabling either of these will cause BookStack to confirm email addresses.

image

If you're finding BookStack is actually asking for an email via an input after logging in, instead of just sending a confirmation email, this may instead be an issue with BookStack not finding an email when the user is fetched from LDAP.

@ssddanbrown commented on GitHub (Apr 12, 2019): > Yeah - I had one admin account created there. Can I just delete this account and all it's created content will stay? Created content will stay but the name will be removed from activity. Alternatively, once LDAP is enabled, you can set a user's 'External Auth ID' (Or something like that) on their profile which is what's used to match a user during LDAP login. > Tested, but there is no new setting in the web UI config. Where can this be typically found? Below are the settings I was referring to in my above comment, Using/Enabling either of these will cause BookStack to confirm email addresses. ![image](https://user-images.githubusercontent.com/8343178/55997486-95487a80-5cb2-11e9-9c40-ba87ecda11c3.png) If you're finding BookStack is actually asking for an email via an input after logging in, instead of just sending a confirmation email, this may instead be an issue with BookStack not finding an email when the user is fetched from LDAP.
Author
Owner

@MorrisJobke commented on GitHub (Apr 12, 2019):

Below are the settings I was referring to in my above comment, Using/Enabling either of these will cause BookStack to confirm email addresses.

Scrolling helps 🙈 I disabled the domain restriction now. That should have solved the issue. Sorry for the noise here and thanks for your help.

@MorrisJobke commented on GitHub (Apr 12, 2019): > Below are the settings I was referring to in my above comment, Using/Enabling either of these will cause BookStack to confirm email addresses. Scrolling helps 🙈 I disabled the domain restriction now. That should have solved the issue. Sorry for the noise here and thanks for your help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1140