Plugin for LDAP for Community Version?

Hey is there a Plugin for strapi that allows me to integrate ldap for the enduser of my application?
I have a frontend with authentication and want to put my ldap as user data base infront of it.
Instead of creating a table with users in the strapi backend.
The users dont have access to the admin panel

This topic has been created from a Discord post (1240946892318445628) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Not to my knowledge

but could I add ldap as a 3rd party provider to strapi in community edition?
So far I am getting a middleware error:
| Loading Strapi[ERROR] There seems to be an unexpected error, try again with --debug for more information

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ Error: Middleware “global::ldapAuth”: middlewareFactory is not a function │
│ at instantiateMiddleware

I am using passport-ldapauth

const passport = require(‘passport’);
const LdapStrategy = require(‘passport-ldapauth’);

module.exports = () => {
const ldapConfig = {
server: {
url: ‘ldaps://link:636’,
bindDN: ‘DC=link,DC=link’,
bindCredentials: ‘password’,
searchBase: ‘DC=link,DC=link’,
searchFilter: ‘(uid={{sAMAccountName}})’,
},
};

passport.use(‘ldap’, new LdapStrategy(ldapConfig, (user, done) => {
done(null, {
ldapDN: user.ldapDN,
ldapUsername: user.username,
});
}));

return {
initialize() {
return passport.initialize();
},
authenticate(ctx, next) {
return passport.authenticate(‘ldap’, { session: false }, (err, user, info) => {
if (err) {
return ctx.throw(401, err);
}
if (!user) {
return ctx.throw(401, ‘Invalid credentials’);
}
ctx.state.user = user;
return next();
})(ctx);
},
};
};

I think you should create a custom Users Permssions provider.
Though I don’t see any examples or documentation of that online…

You can try to register a new provider with this service:

strapi.plugin('users-permissions').service('providers-registry').register('ldap', ldapProvider);

The second parameter is the provider callback function.
As an example you could look at the native reddit provider:

You’ll also need to initialize the grant config.
For reddit it’s done like this:

Once you have that done you can enable the provider through the admin panel.

Then finally you could follow the official docs on how to implement a provider in your front-end

Sadly the Users & Permissions plugin doesn’t have the providers setup like the Email and Upload plugins.
Allowing easy extension like Providers | Strapi Documentation

I will have a look at that. Thanks.
But do you mean this wont work?
Sadly the Users & Permissions plugin doesn’t have the providers setup like the Email and Upload plugins.
Allowing easy extension like this:

I’m not 100% sure my method above will actually work.
You’ll have to do a proof of concept.

These docs Providers | Strapi Documentation
are only for the Email and Upload plugins. Doesn’t work the same for the Users & Permissions plugin