|
|
@ -17,7 +17,11 @@ router.get("/login", saveReferer, passport.authenticate("auth0", {scope: "openid |
|
|
|
res.redirect("/") |
|
|
|
}) |
|
|
|
|
|
|
|
router.get("/callback", passport.authenticate("auth0", { failureRedirect: "/auth/login" }), (req, res) => { |
|
|
|
router.get("/error", (req, res) => { |
|
|
|
res.render("Login error") |
|
|
|
}) |
|
|
|
|
|
|
|
router.get("/callback", passport.authenticate("auth0", { failureRedirect: "/auth/error" }), (req, res) => { |
|
|
|
if (req.user == null) { |
|
|
|
throw new Error("user null"); |
|
|
|
} |
|
|
|