MTBorg / M7011E_lab

0 stars 1 forks source link

Complete navbar #124

Closed MTBorg closed 4 years ago

MTBorg commented 4 years ago

Closes #119 This also adds a function for parsing the authToken cookie, from which the manager flag can be retrieved.

hugowangler commented 4 years ago

I think you forgot to use the new function on the profile logout button. Although this button could probably be removed since you can logout using the navbar now. But I get this error when using it:

JsonWebTokenError: jwt malformed
    at Object.module.exports [as verify] (/usr/src/app/node_modules/jsonwebtoken/verify.js:63:17)
    at parseAuthToken (/usr/src/app/server/auth.js:53:14)
    at /usr/src/app/server/server.js:29:28
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at /usr/src/app/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
MTBorg commented 4 years ago

Yes, i forgot to fix that, it is caused by/related to issue #123 . So that should fixed first.

hugowangler commented 4 years ago

Maybe it can be removed anyway, since we have the logout button in the navbar already.