Browse Source

server: Removed failure callback.

1.0 1.0.4
Gisle Aune 6 years ago
parent
commit
6dd1939c5e
  1. 2
      package.json
  2. 7
      routes/auth.js

2
package.json

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

7
routes/auth.js

@ -17,12 +17,7 @@ router.get("/login", saveReferer, passport.authenticate("auth0", {scope: "openid
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) {
throw new Error("user null");
}

Loading…
Cancel
Save