@auth/express
Advanced tools
Comparing version 0.5.3 to 0.5.4
14
index.js
@@ -138,6 +138,12 @@ /** | ||
return next(err); | ||
config.basePath = getBasePath(req); | ||
setEnvDefaults(process.env, config); | ||
await toExpressResponse(await Auth(toWebRequest(req), config), res); | ||
next(); | ||
try { | ||
config.basePath = getBasePath(req); | ||
setEnvDefaults(process.env, config); | ||
await toExpressResponse(await Auth(toWebRequest(req), config), res); | ||
if (!res.headersSent) | ||
next(); | ||
} | ||
catch (error) { | ||
next(error); | ||
} | ||
}); | ||
@@ -144,0 +150,0 @@ }); |
{ | ||
"name": "@auth/express", | ||
"description": "Authentication for Express.", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -152,6 +152,10 @@ /** | ||
if (err) return next(err) | ||
config.basePath = getBasePath(req) | ||
setEnvDefaults(process.env, config) | ||
await toExpressResponse(await Auth(toWebRequest(req), config), res) | ||
next() | ||
try { | ||
config.basePath = getBasePath(req) | ||
setEnvDefaults(process.env, config) | ||
await toExpressResponse(await Auth(toWebRequest(req), config), res) | ||
if (!res.headersSent) next() | ||
} catch (error) { | ||
next(error) | ||
} | ||
}) | ||
@@ -158,0 +162,0 @@ }) |
Sorry, the diff of this file is not supported yet
62348
997