Add extra auth logging to authenticated.ts

This commit is contained in:
Rory Powell 2022-11-04 08:30:44 +00:00
parent 6b928879fe
commit e3705e8aa3
1 changed files with 1 additions and 0 deletions

View File

@ -152,6 +152,7 @@ export = (
return next()
}
} catch (err: any) {
console.error("Auth Error", err?.message || err)
// invalid token, clear the cookie
if (err && err.name === "JsonWebTokenError") {
clearCookie(ctx, Cookies.Auth)