[BUG] Bug in the implementation of MultiSamlStrategy on NestJS
dovepa opened this issue · comments
Hello everyone,
As stated in the title, my implementation of MultiSamlStrategy on NestJS is not working.
Here's a code example:
export class AzureStrategy extends PassportStrategy(MultiSamlStrategy, 'multi-saml') {
constructor() {
super({
passReqToCallback: true, // makes req available in callback
getSamlOptions: function (request, done) {
findProvider(request, function (err, provider) {
if (err) {
return done(err);
}
return done(null, provider.configuration);
});
}
},
function (req, profile, done) {
findByEmail(profile.email, function (err, user) {
if (err) {
return done(err);
}
return done(null, user);
});
})
}
}
I don't understand why, but I never enter the callback function.
Additionally, I noticed that the certificates are not loaded into the strategy, even though I have properly added them to the configuration.
I also do not enter the certsToCheck function of the library.
Do you know what could be causing the problem?
Version 3.2.4
It appears you are using a deprecated version of passport-saml
. Please upgrade to the latest version. This the note on this page.