|
@ -17,12 +17,7 @@ router.get("/login", saveReferer, passport.authenticate("auth0", {scope: "openid |
|
|
res.redirect("/") |
|
|
res.redirect("/") |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
router.get("/error", (req, res) => { |
|
|
|
|
|
console.error(req) |
|
|
|
|
|
res.status(500).end("Something went wrong.") |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
router.get("/callback", passport.authenticate("auth0", { failureRedirect: "/auth/error" }), (req, res) => { |
|
|
|
|
|
|
|
|
router.get("/callback", passport.authenticate("auth0"), (req, res) => { |
|
|
if (req.user == null) { |
|
|
if (req.user == null) { |
|
|
throw new Error("user null"); |
|
|
throw new Error("user null"); |
|
|
} |
|
|
} |
|
|