Removing faked error.
This commit is contained in:
parent
0f4469e6b8
commit
9dd987ffc2
|
@ -37,9 +37,6 @@ module.exports = (
|
||||||
try {
|
try {
|
||||||
// check the actual user is authenticated first, try header or cookie
|
// check the actual user is authenticated first, try header or cookie
|
||||||
const headerToken = ctx.request.headers[Headers.TOKEN]
|
const headerToken = ctx.request.headers[Headers.TOKEN]
|
||||||
if (headerToken) {
|
|
||||||
throw { name: "JsonWebTokenError" }
|
|
||||||
}
|
|
||||||
const authCookie = getCookie(ctx, Cookies.Auth) || openJwt(headerToken)
|
const authCookie = getCookie(ctx, Cookies.Auth) || openJwt(headerToken)
|
||||||
let authenticated = false,
|
let authenticated = false,
|
||||||
user = null,
|
user = null,
|
||||||
|
|
Loading…
Reference in New Issue