Minor LDAP patches, docs for JumpCloud LDAP

This commit is contained in:
Tuan Dang
2024-02-26 17:04:01 -08:00
parent 9ba4b939a4
commit 91068229bf
12 changed files with 121 additions and 15 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ export const registerLdapRouter = async (server: FastifyZodProvider) => {
return cb(null, { isUserCompleted, providerAuthToken });
} catch (err) {
logger.error(err);
return cb(null, false);
return cb(err, false);
}
}
)
@@ -57,9 +57,9 @@ export const registerLdapRouter = async (server: FastifyZodProvider) => {
})
},
preValidation: passport.authenticate("ldapauth", {
session: false,
failureFlash: true,
failureRedirect: "/login/provider/error"
session: false
// failureFlash: true,
// failureRedirect: "/login/provider/error"
// this is due to zod type difference
}) as any,
handler: (req, res) => {