-
If we have an invalid certificate in passport.use(
new MultiSamlStrategy(
{
passReqToCallback: true, // makes req available in callback
getSamlOptions: function (request, done) {
findProvider(request, function (err, provider) {
try {
if (err) {
return done(err);
}
return done(null, provider.configuration); // <------------- The error source
} catch (e) {
console.error(e.message); // <------------- I'd expect to catch the error here
}
});
},
},
function (req, profile, done) {
// for signon
findByEmail(profile.email, function (err, user) {
if (err) {
return done(err);
}
return done(null, user);
});
},
)
); |
Beta Was this translation helpful? Give feedback.
Answered by
cjbarth
Nov 12, 2022
Replies: 1 comment
-
You should be getting an Passport error, so you would handle it that way. Perhaps this helps. See this too. This will typically be handled by Express and in the typical Node-back style. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
markstos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be getting an Passport error, so you would handle it that way. Perhaps this helps. See this too. This will typically be handled by Express and in the typical Node-back style.