Browse Source

server: Fixed crash in auth failure redirect, added logging instead.

1.0 1.0.3
Gisle Aune 6 years ago
parent
commit
0337424ab0
  1. 2
      package.json
  2. 3
      routes/auth.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@gisle/rpdata-frontend", "name": "@gisle/rpdata-frontend",
"version": "1.0.2",
"version": "1.0.3",
"description": "RPData (www.aiterp.net) frontend/proxy", "description": "RPData (www.aiterp.net) frontend/proxy",
"main": "./index.js", "main": "./index.js",
"scripts": { "scripts": {

3
routes/auth.js

@ -18,7 +18,8 @@ router.get("/login", saveReferer, passport.authenticate("auth0", {scope: "openid
}) })
router.get("/error", (req, res) => { router.get("/error", (req, res) => {
res.render("Login error")
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", { failureRedirect: "/auth/error" }), (req, res) => {

Loading…
Cancel
Save