Make autologin token only one-time use
This commit is contained in:
@@ -542,6 +542,9 @@ function interactionLogin(provider) {
|
||||
await eventlog.add(user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: user.id, user: users.removePrivateFields(user), appId: clientId });
|
||||
if (!user.ghost) safe(users.notifyLoginLocation(user, ip, userAgent, auditSource), { debug });
|
||||
|
||||
// clear token as it is one-time use
|
||||
await tokens.delByAccessToken(req.body.autoLoginToken);
|
||||
|
||||
return res.status(200).send({ redirectTo });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user