Closed girishla closed 8 years ago
/auth/logout does not clear the session. This is probably also causing #96
I think req.cookieAuth.clear() needs to be called in hapi-auth.js like so:
req.cookieAuth.clear()
// LOGOUT START .... ..... ... req.seneca.act("role:'user',cmd:'logout'", {token: clienttoken}, function (err) { if (err) { req.seneca.log('error ', err) } req.cookieAuth.clear(); delete req.seneca.user delete req.seneca.login return req.seneca.act('role: auth, do: respond', {err: err, action: 'logout', req: req}, respond) }) }) }) }
the express version seems to correctly call req.logout() to clear the passportJS session. Its just the hapi version that doesn't seem to.
Happy to do a PR if it helps.
@girishla thank you, good point. Could you please create a PR?
Thank you
@girishla Please do! Good catch
done!
/auth/logout does not clear the session. This is probably also causing #96
I think
req.cookieAuth.clear()
needs to be called in hapi-auth.js like so:the express version seems to correctly call req.logout() to clear the passportJS session. Its just the hapi version that doesn't seem to.
Happy to do a PR if it helps.