Redis and session timeout added

This commit is contained in:
Torsten Schulz
2024-10-27 14:15:44 +01:00
parent 7f8709516d
commit b78dfe6826
9 changed files with 320 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ class AuthController {
this.login = this.login.bind(this);
this.forgotPassword = this.forgotPassword.bind(this);
this.activateAccount = this.activateAccount.bind(this);
this.logout = this.logout.bind(this);
}
async register(req, res) {
@@ -33,6 +34,11 @@ class AuthController {
}
}
async logout(req, res) {
const { userid: hashedUserId } = req.headers;
await userService.logoutUser(hashedUserId);
}
async forgotPassword(req, res) {
const { email } = req.body;
try {