mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
test: passport0.6 (#10638)
* test: passport0.6 * test: make logout async, fix lint * test: keepSessionInfo flag * revert: csrf load
This commit is contained in:
committed by
Julian Lam
parent
20a661e124
commit
33458701c1
@@ -35,7 +35,7 @@ module.exports = function (middleware) {
|
||||
async function authenticate(req, res) {
|
||||
async function finishLogin(req, user) {
|
||||
const loginAsync = util.promisify(req.login).bind(req);
|
||||
await loginAsync(user);
|
||||
await loginAsync(user, { keepSessionInfo: true });
|
||||
await controllers.authentication.onSuccessfulLogin(req, user.uid);
|
||||
req.uid = user.uid;
|
||||
req.loggedIn = req.uid > 0;
|
||||
|
||||
Reference in New Issue
Block a user