feat: plumb current session id into email removal/confirmation flow, so all other sessions are revoked except for the current session

This utilises the new argument in user.auth.revokeAllSessions
This commit is contained in:
Julian Lam
2021-07-28 14:50:52 -04:00
parent b0a4a1d3e4
commit 96398faa3c
2 changed files with 7 additions and 5 deletions

View File

@@ -279,7 +279,7 @@ User.addInterstitials = function (callback) {
}
} else {
// User explicitly clearing their email
await User.email.remove(userData.uid);
await User.email.remove(userData.uid, data.req.session.id);
}
} else {
// New registrants have the confirm email sent from user.create()