fac-13 / HEII-topics

website where you can log in, post topics and vote on topics
https://heii-voting-topics.herokuapp.com/
2 stars 1 forks source link

I think you need an else on line 74 #68

Closed tdoran closed 6 years ago

tdoran commented 6 years ago

I think your if(!jwt) on line 73 should be followed by an else {jwtmodule.verify()}. It's trying to verify a jwt that doesn't exist and triggering the error on line 78, giving the user the message "error validating you, clear cache and login again'"

https://github.com/fac-13/HEII-topics/blob/f41463854fd77518befea620544c589775fd8499/src/handler.js#L73-L74

tdoran commented 6 years ago

Just noticed the 'return' on line 73 should stop line 74 from running! We were still getting the error message from line 78 when we didn't have a jwt though, so not sure why.