drebel / habc

0 stars 0 forks source link

setup logout controller #23

Open drebel opened 11 months ago

drebel commented 11 months ago

setup logout controller to handle logging out

drebel commented 11 months ago

just going to keep this issue open.

from what i understand req.logout should remove the user id from the session string in the db, effectively logging out the user, however i dont see this happening when i call logout.

req.session.destroy() should destroy the session from the db but that gets stuck on an error C:\Users\Drew\Desktop\projects\HABC\server\node_modules\passport\lib\sessionmanager.js:83 req.session.regenerate(function(err) { ^

TypeError: Cannot read properties of undefined (reading 'regenerate')

it was recommended in the thread commented above to downgrade to passport 0.5.3