You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
When I try to get access to fake-api with this get request GET http://localhost:3000/products Authorization: Bearer
I get all the data. But I think I shouldn't. I expecting to get an error "jwt must be provided".
I guess code should be corrected some how like this let verifyTokenResult; try { verifyTokenResult = verifyToken(req.headers.authorization.split(' ')[1]); if (verifyTokenResult instanceof Error) { throw verifyTokenResult; } next()
The text was updated successfully, but these errors were encountered:
Hi!
When I try to get access to fake-api with this get request
GET http://localhost:3000/products Authorization: Bearer
I get all the data. But I think I shouldn't. I expecting to get an error "jwt must be provided".
I guess code should be corrected some how like this
let verifyTokenResult; try { verifyTokenResult = verifyToken(req.headers.authorization.split(' ')[1]); if (verifyTokenResult instanceof Error) { throw verifyTokenResult; } next()
The text was updated successfully, but these errors were encountered: