mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-27 20:25:41 +00:00
fix: don't fail app if LDAP is not configured
This commit is contained in:
@@ -133,7 +133,10 @@ var rootCmd = &cobra.Command{
|
||||
SearchFilter: config.LdapSearchFilter,
|
||||
}
|
||||
ldapService, err = ldap.NewLDAP(ldapConfig)
|
||||
HandleError(err, "Failed to create LDAP service")
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to initialize LDAP service, disabling LDAP authentication")
|
||||
ldapService = nil
|
||||
}
|
||||
} else {
|
||||
log.Info().Msg("LDAP not configured, using local users or OAuth")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user